[CMake] Specify gcc optimization levels

Timo Rumland cr at olympclan.de
Tue Apr 10 12:57:32 EDT 2007


Hello,

how is the usual approach to let the user specify the gcc optimization
levels in the CMake interface? There are several variables like

-------
 CMAKE_CXX_FLAGS
 CMAKE_CXX_FLAGS_DEBUG           -g
 CMAKE_CXX_FLAGS_MINSIZEREL      -Os -DNDEBUG
 CMAKE_CXX_FLAGS_RELEASE         -O3 -DNDEBUG
 CMAKE_CXX_FLAGS_RELWITHDEBINFO  -O2 -g
-------

but what is CMake using as the default, and how may I give the user
the posibility to change the "-ox" flags?


Thanks a lot for your help



More information about the CMake mailing list