Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
90a5d500901251780fa557be26b9518f1b7fb096
[simgrid.git] / buildtools / Cmake / Flags.cmake
1 set(warnCFLAGS "")
2 set(optCFLAGS "")
3
4 if(NOT WIN32)
5 set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS}-g3)
6 if(enable_supernovae)
7         set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
8         set(optCFLAGS "-O3 -finline-functions -funroll-loops -fno-strict-aliasing ")
9 endif(enable_supernovae)
10
11 if(enable_compile_warnings)
12         set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
13 endif(enable_compile_warnings)
14
15 if(enable_compile_optimizations)
16         set(optCFLAGS "-O3 -finline-functions -funroll-loops -fno-strict-aliasing ")
17 endif(enable_compile_optimizations)
18 endif(NOT WIN32)
19
20 set(CMAKE_C_FLAGS "${optCFLAGS}${warnCFLAGS}${CMAKE_C_FLAGS}")