Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-05-19 02:29:58


Author: dgregor
Date: 2007-05-19 02:29:58 EDT (Sat, 19 May 2007)
New Revision: 4134
URL: http://svn.boost.org/trac/boost/changeset/4134

Log:
Only create BUILD_BOOST_LIBNAME options in CMake if the library has compiled static or shared libs

Text files modified:
   sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake | 17 +++++++++++++----
   1 files changed, 13 insertions(+), 4 deletions(-)

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake 2007-05-19 02:29:58 EDT (Sat, 19 May 2007)
@@ -147,11 +147,20 @@
     )
 
   string(TOUPPER "BUILD_BOOST_${libname_}" BOOST_BUILD_LIB_OPTION)
- option(${BOOST_BUILD_LIB_OPTION}
- "Build Boost.${libname_} (prefer make targets, not this, to build individual libs)"
- ON)
- if(${BOOST_BUILD_LIB_OPTION})
+ if (THIS_SUBPROJECT_SRCDIRS)
+ # This Boost library has source directories, so provide an option
+ # BUILD_BOOST_LIBNAME that allows one to turn on/off building of
+ # the library.
+ option(${BOOST_BUILD_LIB_OPTION}
+ "Build Boost.${libname_} (prefer make targets, not this, to build individual libs)"
+ ON)
+ else (THIS_SUBPROJECT_SRCDIRS)
+ # This Boost library has no source directories, and therefore does
+ # not require building. Always enable it.
+ set(${BOOST_BUILD_LIB_OPTION} ON)
+ endif (THIS_SUBPROJECT_SRCDIRS)
 
+ if(${BOOST_BUILD_LIB_OPTION})
     string(TOLOWER "${libname_}" libname)
     project(${libname})
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk