[CMake] TARGET_LINK_LIBRARIES debug and optimized
Brad King
brad.king at kitware.com
Wed Jul 20 10:20:16 EDT 2005
Filipe Sousa wrote:
> If I call TARGET_LINK_LIBRARIES(dr debug mylib_debug optimized mylib) and
> CMAKE_BUILD_TYPE isn't set then none of the libraries are used:
>
> src/dr: src/dr.dir/build.make
> @echo "Linking CXX executable src/dr"
> c++ -fPIC $(dr_OBJECTS) $(dr_EXTERNAL_OBJECTS) -o src/dr -rdynamic
> -L/home/fsousa/tmp/dr/build/libs -Wl,-rpath,/home/fsousa/tmp/dr/build/libs
>
> Maybe one them should be used as default or add another keyword to
> TARGET_LINK_LIBRARIES or there is another way?
I'm not sure what the proper solution will be but please submit a bug
report:
http://www.cmake.org/Bug
You can work-around the problem for now by having your listfile code set
a default value for CMAKE_BUILD_TYPE.
-Brad
More information about the CMake
mailing list