Line | |
---|
1 | IF(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) |
---|
31 | ELSE(CMAKE_COMPILER_IS_GNUCC) |
---|
32 | |
---|
33 | MESSAGE("Your compiler isn't fully supported yet - no flags set.") |
---|
34 | ENDIF(CMAKE_COMPILER_IS_GNUCC) |
---|
Note: See
TracBrowser
for help on using the repository browser.