summaryrefslogtreecommitdiffstats
path: root/CompileFlags.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-27 16:11:08 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-27 16:11:08 (GMT)
commit6720d31ed0aed77c5d17554c4ae616296b93f5b3 (patch)
treeaa815a5ec918d3fc31e66bf27fb53a934b3e0fb4 /CompileFlags.cmake
parent9605af8c2ef280b7f0704d3bcb3bc980739ca073 (diff)
downloadCMake-6720d31ed0aed77c5d17554c4ae616296b93f5b3.zip
CMake-6720d31ed0aed77c5d17554c4ae616296b93f5b3.tar.gz
CMake-6720d31ed0aed77c5d17554c4ae616296b93f5b3.tar.bz2
Disable Intel CRT deprecation warnings
The Intel Compiler for Windows uses the MS runtime library which deprecates many C functions. We define _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE to disable the deprecation warnings.
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r--CompileFlags.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index ed12ab2..1d2f92a 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -25,9 +25,9 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
# really only needed for newer versions of VS, but should
# not hurt other versions, and this will work into the
# future
-IF(MSVC)
+IF(MSVC OR WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
-ENDIF(MSVC)
+ENDIF()
#silence duplicate symbol warnings on AIX
IF(CMAKE_SYSTEM MATCHES "AIX.*")