[CMake] debug, optimized, and custom

jesseperla at gmail.com jesseperla at gmail.com
Wed Feb 25 08:02:53 EST 2009


On Wed, Feb 25, 2009 at 1:38 AM, Hendrik Sattler <post at hendrik-sattler.de>  
wrote:
debug and optimized keywords are followed by _one_ library. The help entry
defines this correctly.

Thanks and sorry I missed that in the help. cmake really is amazing, but I  
also find it massive. The "Mastering Cmake" book is excellent, but if  
people write an even longer text with lots of tutorial examples I promise  
to buy it.

I have now changed things around to do the following:
#Set in my find module.
set(ETK_LIBS debug scl-d
optimized scl
debug libIpopt-mt-d
optimized libIpopt-mt) #in reality, there are about 20 libs

#set in my cmakelists.txt for my project.
add_executable(hello2 ${hello2_SRCS})
target_link_libraries(hello2 ${ETK_LIBS })

Is this the best way to setup long lists of libraries to link in?

And is there any way for me to have separate lists that work for my custom  
build type that works in visual studio? I want an MPI and heavily optimized  
build type that people can choose.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090225/bd933fd8/attachment.htm>


More information about the CMake mailing list