From: Victor Romero Date: Fri, 7 Jun 2019 06:40:20 +0000 (+0300) Subject: Define _CRT_SECURE_NO_DEPRECATE macro in CMake script only for MS VC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c24cb6d1942fbc2448e2afe328fd4aa2408a1f8;p=gc Define _CRT_SECURE_NO_DEPRECATE macro in CMake script only for MS VC (fix of commit f5006fcc5) Issue #281 (bdwgc). * CMakeLists.txt (add_definitions): Define _CRT_SECURE_NO_DEPRECATE only if MSVC (instead of WIN32). --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f70041d3..ea47dc25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ if (APPLE) set(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64" CACHE STRING "Build architectures for Mac OS X" FORCE) endif() -elseif (WIN32) +elseif (MSVC) add_definitions("-D_CRT_SECURE_NO_DEPRECATE") endif()