[CMake] Studio 8 generation of files doesn't use CMAKE_CXX_FLAGS?

Brad King brad.king at kitware.com
Wed Nov 1 14:49:17 EST 2006


Clinton Chau wrote:
> You're right, that property is being set in the CMakeList.txt file.
> 
> Given this, how should you make CMAKE_CXX_FLAGS available to the user for
> modification in CMakeSetup.exe, without setting the value in CMakeLists.txt?
> That is, I always want the user to be able to customize the compiler flags,
> so I always want it to show up in the GUI (if only as an Advanced setting).

It is presented by default.  If you're trying to add flags just do

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -my-new-flag")

Then the user-set value will be used and your project's special extra
flags will be added.

-Brad


More information about the CMake mailing list