From f5006fcc53023d40c7477f6eeca916e475d2b3f4 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Wed, 5 Jun 2019 10:49:30 +0300 Subject: [PATCH] Define _CRT_SECURE_NO_DEPRECATE macro in CMake script only for Win32 Issue #281 (bdwgc). * CMakeLists.txt (add_definitions): Define _CRT_SECURE_NO_DEPRECATE only if WIN32. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f15f90e..5fff6fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,6 @@ option(enable_register_main_static_data "Perform the initial guess of data root option(enable_checksums "Report erroneously cleared dirty bits" OFF) option(enable_handle_fork "Attempt to ensure a usable collector after fork()" ON) -add_definitions("-D_CRT_SECURE_NO_DEPRECATE") add_definitions("-DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION") if (APPLE) @@ -56,7 +55,9 @@ if (APPLE) set(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64" CACHE STRING "Build architectures for Mac OS X" FORCE) endif() -endif(APPLE) +elseif (WIN32) + add_definitions("-D_CRT_SECURE_NO_DEPRECATE") +endif() #LIBATOMIC #TODO #ADD_LIBRARY(atomic_ops STATIC ) -- 2.7.4