Boost logo

Boost Interest :

Subject: [Boost-cmake] RFC: exported targets
From: Michael Jackson (mike.jackson_at_[hidden])
Date: 2009-10-29 15:16:50

So the problem I see with this is that I still need to know "a priori"
what boost libraries are available on the system so exporting the
targets really doesn't help much, at least not me.
In your example (quoted below) what happens if I don't have the shared-
debug of boost-thread but instead of static-debug?
add_executable(my_program main.cpp) target_link_libraries(my_program

Currently I have something like:

target_link_libraries(MyProgram ${Boost_THREAD_LIBRARY})
That line will "do the right thing" depending if I compile in debug or
release. The variable is based on what is found in the boost
installation. We can all probably agree that the weakest part of
FindBoost.cmake is the actual "finding" of the boost libraries based
on all of the possible suffixes that are put on the libraries. If
there was a UseBoost.cmake file, all the ${Boost_XXX_LIBRARY} would be
filled in and no _searching_ would be required by FindBoost.cmake. At
most someone might have to just set BOOST_ROOT as an environment
variable or point cmake to where the UseBoost.cmake file is at.
   Debugging problems when "FindBoost.cmake" doesn't find boost is a
PITA. I has happened to me more than a few times.
Comments on my comments?
Mike Jackson mike.jackson_at_[hidden]
BlueQuartz Software
Principal Software Engineer Dayton, Ohio

Boost-cmake list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at