Browse Source

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.
Brad King 16 years ago
parent
commit
6720d31ed0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      CompileFlags.cmake

+ 2 - 2
CompileFlags.cmake

@@ -25,9 +25,9 @@ INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
 # really only needed for newer versions of VS, but should
 # really only needed for newer versions of VS, but should
 # not hurt other versions, and this will work into the 
 # not hurt other versions, and this will work into the 
 # future
 # 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)
   ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
-ENDIF(MSVC)
+ENDIF()
 
 
 #silence duplicate symbol warnings on AIX
 #silence duplicate symbol warnings on AIX
 IF(CMAKE_SYSTEM MATCHES "AIX.*")
 IF(CMAKE_SYSTEM MATCHES "AIX.*")