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 IF(CMAKE_COMPILER_2005)
14 ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
15 ENDIF(CMAKE_COMPILER_2005)
17 #silence duplicate symbol warnings on AIX
18 IF(CMAKE_SYSTEM MATCHES "AIX.*")
19 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
20 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
21 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
22 ENDIF(CMAKE_SYSTEM MATCHES "AIX.*")
24 IF(CMAKE_SYSTEM MATCHES "IRIX.*")
25 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
26 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
27 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
28 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
29 ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
31 IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
32 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
33 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
34 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
35 ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
37 # use the ansi CXX compile flag for building cmake
38 IF (CMAKE_ANSI_CXXFLAGS)
39 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
40 ENDIF (CMAKE_ANSI_CXXFLAGS)
42 IF (CMAKE_ANSI_CFLAGS)
43 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
44 ENDIF (CMAKE_ANSI_CFLAGS)