|
Boost Interest : |
Subject: Re: [Boost-cmake] Building boost "with an uninstalled build" and linking to boost libs
From: Michael Jackson (mike.jackson_at_[hidden])
Date: 2010-03-24 15:44:07
The Boost-CMake (IMHO) sort of "abused" the cmake system somewhat in
order to make it more "bjam" like.
In practice if the first pass of FindBoost.cmake does not find
anything then I usually have to manually go into the CMakeCache.txt
file and remove all the boost variables and re-run CMake. You can also
probably do this using the CMake-Gui program.
Basically for each library, look in boost/libs/filesystem/
CMakeLists.txt. That file should get you started in the right location
to start trying to figure out what is going wrong.
___________________________________________________________
Mike Jackson www.bluequartz.net
Principal Software Engineer mike.jackson_at_[hidden]
BlueQuartz Software Dayton, Ohio
On Mar 24, 2010, at 3:39 PM, Brian Davis wrote:
>
> I was snooping around in FindBoost.cmake and found
>
> IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_$
> {basename}_LIBRARY_RELEASE)
> # if the generator supports configuration types then set
> # optimized and debug libraries, or if the CMAKE_BUILD_TYPE
> has a value
> IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
> SET(Boost_${basename}_LIBRARY optimized ${Boost_$
> {basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
> ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
> # if there are no configuration types and CMAKE_BUILD_TYPE
> has no value
> # then just use the release libraries
> SET(Boost_${basename}_LIBRARY ${Boost_$
> {basename}_LIBRARY_RELEASE} )
> ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
> SET(Boost_${basename}_LIBRARIES optimized ${Boost_$
> {basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
> ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_$
> {basename}_LIBRARY_RELEASE)
>
> Note the Boost_${basename}_LIBRARY
>
> This was/is a result of a rogue find_package(Boost ...) which was
> setting ${Boost_FILESYSTEM_LIBRARY} :
>
> find_package( Boost REQUIRED COMPONENTS system filesystem NO_MODULE )
>
> Now that this has been removed:
>
> MESSAGE( "Boost_FILESYSTEM_LIBRARY = " ${Boost_FILESYSTEM_LIBRARY} )
>
> now returns
>
> Boost_FILESYSTEM_LIBRARY =
>
>
> which I am not sure is a step in the right direction, it may in fact
> be a step sideways and one step backwards.
>
> I am now snooping though BoostCore.cmake.... Would be nice if
> BoostCore would generate these targets... maybe it does. And I
> thought Boost.Build V2 was bad.
>
> Brian
>
>
> _______________________________________________
> Boost-cmake mailing list
> Boost-cmake_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-cmake