[CMake] re-running cmake with different flags doesn't work

Andreas Pakulat apaku at gmx.de
Fri Jul 25 04:29:04 EDT 2008


Hi,

I've just noticed that re-running cmake and changing -DCMAKE_CXX_FLAGS
doesn't work as one would expect. This claims to be rebuilding the
makefiles, however after running a make clean and make VERBOSE=1 I don't
see the flags being applied.

To make this clear, what I'm doing is:

cmake ../
make
cmake -DCMAKE_CXX_FLAGS=-g ../
make clean
make VERBOSE=1

And the -g flag is not there on the g++ line. Sample CMakeLists.txt:

,----
| add_executable(foo main.cpp)
`----

Looking at the cache I can't see the -g flag there - except in the DEBUG
versions where it always appears.

Should I file a bugreport?

Andreas

-- 
You'll be called to a post requiring ability in handling groups of people.


More information about the CMake mailing list