Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52851 - branches/release/tools/build/CMake
From: dgregor_at_[hidden]
Date: 2009-05-08 10:55:01


Author: dgregor
Date: 2009-05-08 10:55:00 EDT (Fri, 08 May 2009)
New Revision: 52851
URL: http://svn.boost.org/trac/boost/changeset/52851

Log:
Allow subsetting the set of Boost libraries to test in CMake via BOOST_TEST_LIBRARIES
Text files modified:
   branches/release/tools/build/CMake/BoostCore.cmake | 15 ++++++++++++++-
   branches/release/tools/build/CMake/BoostTesting.cmake | 3 +++
   2 files changed, 17 insertions(+), 1 deletions(-)

Modified: branches/release/tools/build/CMake/BoostCore.cmake
==============================================================================
--- branches/release/tools/build/CMake/BoostCore.cmake (original)
+++ branches/release/tools/build/CMake/BoostCore.cmake 2009-05-08 10:55:00 EDT (Fri, 08 May 2009)
@@ -313,7 +313,20 @@
 
     if(BUILD_TESTING AND THIS_PROJECT_TESTDIRS)
       # Testing is enabled globally and this project has some
- # tests. So, include the tests
+ # tests. Check whether we should include these tests.
+ if (BOOST_TEST_LIBRARIES)
+ set(SAVED_TESTDIRS ${THIS_PROJECT_TESTDIRS})
+ set(THIS_PROJECT_TESTDIRS)
+ foreach (TESTLIB ${BOOST_TEST_LIBRARIES})
+ if (${TESTLIB} STREQUAL ${libname})
+ # We are allowed to test this library; restore the set of
+ # test directories for this library.
+ set(THIS_PROJECT_TESTDIRS ${SAVED_TESTDIRS})
+ endif()
+ endforeach ()
+ endif()
+
+ # Include the test directories.
       foreach(SUBDIR ${THIS_PROJECT_TESTDIRS})
         add_subdirectory(${SUBDIR})
       endforeach()

Modified: branches/release/tools/build/CMake/BoostTesting.cmake
==============================================================================
--- branches/release/tools/build/CMake/BoostTesting.cmake (original)
+++ branches/release/tools/build/CMake/BoostTesting.cmake 2009-05-08 10:55:00 EDT (Fri, 08 May 2009)
@@ -43,6 +43,9 @@
   enable_testing()
 
   option(TEST_INSTALLED_TREE "Enable testing of an already-installed tree" OFF)
+
+ set(BOOST_TEST_LIBRARIES ""
+ CACHE STRING "Semicolon-separated list of Boost libraries to test")
   
   if (TEST_INSTALLED_TREE)
     include("${CMAKE_INSTALL_PREFIX}/lib/Boost${BOOST_VERSION}/boost-targets.cmake")


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