[CMake] re-running cmake with different flags doesn't work
Andreas Pakulat
apaku at gmx.de
Fri Jul 25 12:05:49 EDT 2008
On 25.07.08 11:56:17, Brad King wrote:
> Andreas Pakulat wrote:
> > 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?
>
> I just tried this in CMake 2.4 and 2.6 and it works fine.
> I can even switch the flags multiple times.
Hmm, strange now I can't reproduce it either.
Andreas
--
You single-handedly fought your way into this hopeless mess.
More information about the CMake
mailing list