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

Brad King brad.king at kitware.com
Wed Nov 1 12:48:52 EST 2006


Clinton Chau wrote:
> In order to change the compiler options, and to submit additional
> preprocessor defines, I have ended up having to modify the
> CMAKE_CXX_FLAGS property in the CMakeLists.txt in the root of the project.
> 
> 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.

-Brad


More information about the CMake mailing list