Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/freealut-1.1.0/admin/CMakeModules/FindCompilerFlagsSet.cmake @ 14

Last change on this file since 14 was 14, checked in by landauf, 17 years ago

added freealut

File size: 1.2 KB
Line 
1IF(CMAKE_COMPILER_IS_GNUCC)
2  #ADD_DEFINITIONS(-std=c99)
3
4  IF(WARNINGS)
5    SET(ADD_WFLAGS "${ADD_WFLAGS} -Wall -ansi -pedantic -W")
6
7    IF(MORE_WARNINGS)
8      SET(ADD_WFLAGS "${ADD_WFLAGS} -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wdisabled-optimization -Wendif-labels -Winline -Wlong-long -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-prototypes -Wwrite-strings")
9    ENDIF(MORE_WARNINGS)
10
11    # Should we use turn warnings into errors?
12    IF(USE_WERROR)
13      SET(ADD_WFLAGS "${ADD_WFLAGS} -Werror -pedantic-errors")
14    ENDIF(USE_WERROR)
15  ENDIF(WARNINGS)
16
17  IF(OPTIMIZATION)
18    SET(ADD_CFLAGS "${ADD_CFLAGS} -O2 -finline-functions -ffast-math")
19  ENDIF(OPTIMIZATION)
20
21  IF(PROFILE)
22    SET(ADD_CFLAGS "${ADD_CFLAGS} -pg")
23    SET(ADD_LDFLAGS "-pg")
24  ELSE(PROFILE)
25
26    IF(OPTIMIZATION)
27      # -pg and -fomit-frame-pointer are incompatible
28      SET(ADD_CFLAGS "${ADD_CFLAGS} -fomit-frame-pointer")
29    ENDIF(OPTIMIZATION)
30  ENDIF(PROFILE)
31ELSE(CMAKE_COMPILER_IS_GNUCC)
32
33  MESSAGE("Your compiler isn't fully supported yet - no flags set.")
34ENDIF(CMAKE_COMPILER_IS_GNUCC)
Note: See TracBrowser for help on using the repository browser.