From: Victor Romero Date: Wed, 5 Jun 2019 07:49:30 +0000 (+0300) Subject: Define _CRT_SECURE_NO_DEPRECATE macro in CMake script only for Win32 X-Git-Tag: upstream/8.0.4~225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5006fcc53023d40c7477f6eeca916e475d2b3f4;p=platform%2Fupstream%2Flibgc.git 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. --- 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 )