Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-07-03 16:01:20


Author: troy
Date: 2008-07-03 16:01:20 EDT (Thu, 03 Jul 2008)
New Revision: 47056
URL: http://svn.boost.org/trac/boost/changeset/47056

Log:

upper cmakelists for sanity tests

Added:
   branches/CMake/release/tools/build/CMake/sanity/CMakeLists.txt (contents, props changed)

Added: branches/CMake/release/tools/build/CMake/sanity/CMakeLists.txt
==============================================================================
--- (empty file)
+++ branches/CMake/release/tools/build/CMake/sanity/CMakeLists.txt 2008-07-03 16:01:20 EDT (Thu, 03 Jul 2008)
@@ -0,0 +1,39 @@
+# Find each subdirectory containing a CMakeLists.txt file, and include
+# it. This avoids the need to manually list which libraries in Boost
+# have CMakeLists.txt files.
+
+# return a list of directories that we should add_subdirectory()
+macro(BOOST_COLLECT_SUBPROJECT_DIRECTORY_NAMES varname filename)
+ file(GLOB BOOST_LIBRARY_CMAKE_FILES
+ RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*/${filename}")
+ foreach(BOOST_LIB_CMAKE_FILE ${BOOST_LIBRARY_CMAKE_FILES})
+ get_filename_component(BOOST_LIB_DIR ${BOOST_LIB_CMAKE_FILE} PATH)
+ set(${varname} ${${varname}} ${BOOST_LIB_DIR})
+ endforeach(BOOST_LIB_CMAKE_FILE ${BOOST_LIBRARY_CMAKE_FILES})
+endmacro(BOOST_COLLECT_SUBPROJECT_DIRECTORY_NAMES varname)
+
+macro(ADD_SUBDIRECTORIES prefix)
+ foreach(subdir ${ARGN})
+ MESSAGE(STATUS "${prefix}${subdir}")
+ add_subdirectory(${subdir})
+ endforeach(subdir ${ARGN})
+endmacro(ADD_SUBDIRECTORIES prefix)
+
+# Find all of the subdirectories with .cmake files in them. These are
+# the libraries with dependencies.
+boost_collect_subproject_directory_names(BOOST_MODULE_DIRS "module.cmake")
+
+foreach(subdir ${BOOST_MODULE_DIRS})
+ include("${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/module.cmake")
+endforeach(subdir)
+
+# Find all of the subdirectories with CMakeLists.txt files in
+# them. This contains all of the Boost libraries.
+boost_collect_subproject_directory_names(BOOST_SUBPROJECT_DIRS "CMakeLists.txt")
+
+# Add all of the Boost projects in reverse topological order, so that
+# a library's dependencies show up before the library itself.
+set(CPACK_INSTALL_CMAKE_COMPONENTS_ALL)
+list(SORT BOOST_SUBPROJECT_DIRS)
+topological_sort(BOOST_SUBPROJECT_DIRS BOOST_ _DEPENDS)
+add_subdirectories(" + " ${BOOST_SUBPROJECT_DIRS})


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