summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-28 12:42:20 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-28 12:42:20 (GMT)
commit054b587504cfa3a5f80a502f7d231104b579b5df (patch)
tree6608ec06c85c448fbe97edd9e5cc1f68c9f179a3
parente97fc32a6372c3dcc3508857cc76e610bd88e182 (diff)
downloadCMake-054b587504cfa3a5f80a502f7d231104b579b5df.zip
CMake-054b587504cfa3a5f80a502f7d231104b579b5df.tar.gz
CMake-054b587504cfa3a5f80a502f7d231104b579b5df.tar.bz2
Re-disable MSVC CRT deprecation warnings
The commit "Disable Intel CRT deprecation warnings" broke the logic that disabled MS's CRT deprecation warnings. This fixes the logic to disable the warnings for both MSVC and Intel.
-rw-r--r--CompileFlags.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index 1d2f92a..3b455b9 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -21,12 +21,17 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
+IF(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+ SET(_INTEL_WINDOWS 1)
+ENDIF()
+
# Disable deprecation warnings for standard C functions.
# really only needed for newer versions of VS, but should
# not hurt other versions, and this will work into the
# future
-IF(MSVC OR WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+IF(MSVC OR _INTEL_WINDOWS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+ELSE()
ENDIF()
#silence duplicate symbol warnings on AIX