1 #-----------------------------------------------------------------------------
2 # set some special flags for different compilers
4 IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
5 SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
6 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
7 IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
8 SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
9 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
10 INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
12 # Disable deprecation warnings for standard C functions.
13 # really only needed for newer versions of VS, but should
14 # not hurt other versions, and this will work into the
17 ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
20 #silence duplicate symbol warnings on AIX
21 IF(CMAKE_SYSTEM MATCHES "AIX.*")
22 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
23 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
24 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
25 ENDIF(CMAKE_SYSTEM MATCHES "AIX.*")
27 IF(CMAKE_SYSTEM MATCHES "IRIX.*")
28 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
29 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
30 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
31 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
32 ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
34 IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
35 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
36 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
37 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
38 ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
40 # use the ansi CXX compile flag for building cmake
41 IF (CMAKE_ANSI_CXXFLAGS)
42 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
43 ENDIF (CMAKE_ANSI_CXXFLAGS)
45 IF (CMAKE_ANSI_CFLAGS)
46 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
47 ENDIF (CMAKE_ANSI_CFLAGS)