[CMake] debug- and release options

Brad King brad.king at kitware.com
Tue Feb 7 09:36:52 EST 2006


Filipe Sousa wrote:
> Brad King wrote:
>>There is no default, if the build type is not set then _neither_ will be 
>>linked.  The reason there is no default is a bit complicated (I once 
> Are you sure? I did this test with the fallowing CMakeLists.txt
[snip]
> fsousa at neptuno ~/tmp/default/build $ cmake -DCMAKE_BUILD_TYPE="" ..
> /usr/bin/gcc   -o CMakeFiles/default.dir/main.o   -c
> /home/fsousa/tmp/default/main.c
> Linking C executable default
> /usr/local/bin/cmake -E remove -f default
> /usr/bin/gcc     -fPIC "CMakeFiles/default.dir/main.o"   -o default
> - -rdynamic -L/home/fsousa/tmp/default/build -lrelease_lib
> - -Wl,-rpath,/home/fsousa/tmp/default/build
> 
> if build type is not set release_lib is used

You're right.  I just found the spot in the code that does this.  I 
don't know why I don't remember fixing it but it is my own code :)

-Brad


More information about the CMake mailing list