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

Clinton Chau clinton at clearcanvas.ca
Wed Nov 1 14:02:51 EST 2006


> -----Original Message-----
> From: Brad King [mailto:brad.king at kitware.com]
[...]
> > Am I just not understanding how CMake works, since I am new to using
> CMake?
> 
> If the CMakeLists.txt file contains
> 
> SET(CMAKE_CXX_FLAGS ...)
> 
> then it always overrides the cached value.  The cache value is just used
> to initialize the listfile variable.  The generators use the final value
> from the listfile.

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).

Clinton




More information about the CMake mailing list