|
Boost Users : |
Subject: [Boost-users] CMake thoughts
From: Robert Bielik (robert.bielik_at_[hidden])
Date: 2009-06-02 02:53:09
Hi,
The preliminary CMake file in the distr. (1.38.0) is IMHO way, WAY too complex. It makes no sense to have each sublib as
a separate project, and in all different flavors at that (debug/rel/mt/st). It seems as it is designed just to create
the boost libraries, which in my view in a non-sensical approach of using CMake since boost is a library, not a standalone application.
The CMake file should be designed for inclusion in user CMake hierarchies, so I'd like a much more simple variant
akin towards this:
project(boost)
option(BOOST_BUILD_STATIC_LIBRARY "Build Boost as STATIC library" ON)
set(BOOST_INCLUDED_LIBRARIES
<list of all the sublibraries wanted/needed>
)
# Collect all the files needed into variable BOOST_SOURCE_FILES using the
# list from above
file(GLOB ...)
if (BOOST_BUILD_STATIC_LIBRARY)
add_library(boost STATIC ${BOOST_SOURCE_FILES})
else (BOOST_BUILD_STATIC_LIBRARY)
add_library(boost DYNAMIC ${BOOST_SOURCE_FILES})
endif (BOOST_BUILD_STATIC_LIBRARY)
This way I can easily incorporate boost into my own CMake hierarchy for creating my own projects and not clutter the
workspace with hundreds of projects all with different settings.
Just my 2 cents.
Regards
/Rob
Ps. Haven't checked the list for a while, so apologies if I'm kicking in opened doors.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net