Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-05-18 02:26:33


Author: dgregor
Date: 2007-05-18 02:26:32 EDT (Fri, 18 May 2007)
New Revision: 4108
URL: http://svn.boost.org/trac/boost/changeset/4108

Log:
libs/test/src/CMakeLists.txt:
  - Mark libraries with STATIC_TAG

tools/build/CMake/boost-core.cmake:
  - Added support for library versioning

tools/build/CMake/boost-testing.cmake:
  - Dart configuration

CMakeLists.txt:
  - Trivial tweak turning strings into numbers in the version

Text files modified:
   sandbox/troy/boost_1_34_0/CMakeLists.txt | 6 +-
   sandbox/troy/boost_1_34_0/libs/test/src/CMakeLists.txt | 2
   sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake | 107 ++++++++++++++++++++++++++++++++++++++-
   sandbox/troy/boost_1_34_0/tools/build/CMake/boost-testing.cmake | 6 ++
   4 files changed, 115 insertions(+), 6 deletions(-)

Modified: sandbox/troy/boost_1_34_0/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/CMakeLists.txt 2007-05-18 02:26:32 EDT (Fri, 18 May 2007)
@@ -5,9 +5,9 @@
 ##########################################################################
 
 # Boost version
-set(BOOST_VERSION_MAJOR "1")
-set(BOOST_VERSION_MINOR "35")
-set(BOOST_VERSION_SUBMINOR "0")
+set(BOOST_VERSION_MAJOR 1)
+set(BOOST_VERSION_MINOR 35)
+set(BOOST_VERSION_SUBMINOR 0)
 set(BOOST_VERSION "${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_SUBMINOR}")
 
 # Whether to build static libraries

Modified: sandbox/troy/boost_1_34_0/libs/test/src/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/libs/test/src/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/libs/test/src/CMakeLists.txt 2007-05-18 02:26:32 EDT (Fri, 18 May 2007)
@@ -14,6 +14,7 @@
 
 boost_library(boost_prg_exec_monitor
   execution_monitor.cpp cpp_main.cpp
+ STATIC_TAG
   SHARED_COMPILE_FLAGS -DBOOST_TEST_DYN_LINK=1 ${BOOST_SHARED_COMPILE_FLAGS})
 
 boost_library(boost_test_exec_monitor
@@ -55,6 +56,7 @@
     unit_test_suite.cpp
     xml_log_formatter.cpp
     xml_report_formatter.cpp
+ STATIC_TAG
   SHARED_COMPILE_FLAGS -DBOOST_TEST_DYN_LINK=1 ${BOOST_SHARED_COMPILE_FLAGS}
   )
 

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-18 02:26:32 EDT (Fri, 18 May 2007)
@@ -12,6 +12,93 @@
   set(${varname} ${${varname}} ${ARGN})
 endmacro(append varname)
 
+option(
+ USE_VERSIONING
+ "Use versioned library names, e.g., libboost_filesystem-gcc41-d"
+ ON)
+
+if(USE_VERSIONING)
+ # Set BOOST_VERSIONING_TOOLSET_TAG to the string that describes the
+ # Boost.Build toolset. This is used as part of the versioned library
+ # name.
+ set(BOOST_VERSIONING_TOOLSET_TAG "")
+
+ if (MSVC60)
+ set(BOOST_VERSIONING_TOOLSET_TAG "-vc6")
+ elseif(MSVC70)
+ set(BOOST_VERSIONING_TOOLSET_TAG "-vc7")
+ elseif(MSVC71)
+ set(BOOST_VERSIONING_TOOLSET_TAG "-vc71")
+ elseif(MSVC80)
+ set(BOOST_VERSIONING_TOOLSET_TAG "-vc80")
+ elseif(MSVC)
+ message("Unknown Microsoft Visual C++ compiler: cannot version libraries")
+ elseif(BORLAND)
+ set(BOOST_VERSIONING_TOOLSET_TAG "-bcb")
+ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ # Execute GCC with the -dumpversion option, to give us a version string
+ execute_process(
+ COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion"
+ OUTPUT_VARIABLE GCC_VERSION_STRING)
+
+ # Match only the major and minor versions of the version string
+ string(REGEX MATCH "[0-9]+.[0-9]+" GCC_MAJOR_MINOR_VERSION_STRING
+ "${GCC_VERSION_STRING}")
+
+ # Strip out the period between the major and minor versions
+ string(REGEX REPLACE "\\." "" BOOST_VERSIONING_GCC_VERSION
+ "${GCC_MAJOR_MINOR_VERSION_STRING}")
+
+ # Set the GCC versioning toolset
+ set(BOOST_VERSIONING_TOOLSET_TAG "-gcc${BOOST_VERSIONING_GCC_VERSION}")
+ else(MSVC60)
+ message("Unknown compiler: cannot version libraries")
+ endif(MSVC60)
+
+ # TODO: Multithreading tag should go here
+
+ # When determining the ABI tag, we need to differentiate between
+ # what comes before the debug tag ('d') and what comes after,
+ # because we can't detect at this point whether we're going to build
+ # debug or not.
+ set(BOOST_VERSIONING_ABI_TAG_PREFIX "")
+ set(BOOST_VERSIONING_ABI_TAG_SUFFIX "")
+
+ # Determine the ABI tag for versioning
+ # TODO: Linking statically to C++ standard library
+ # TODO: Using debug versions of the standard/runtime support libs
+ # TODO: using debug build of Python
+ # This is where the debug tag lives. Switch from PREFIX to SUFFIX
+ # TODO: STLport rather than default library
+ # TODO: STLport's deprecated iostreams
+
+ set(BOOST_VERSIONING_ABI_TAG_DEBUG
+ "-${BOOST_VERSIONING_ABI_TAG_PREFIX}d${BOOST_VERSIONING_ABI_TAG_SUFFIX}")
+ if(BOOST_VERSIONING_ABI_TAG_PREFIX OR BOOST_VERSIONING_ABI_TAG_SUFFIX)
+ set(BOOST_VERSIONING_ABI_TAG
+ "-${BOOST_VERSIONING_ABI_TAG_PREFIX}${BOOST_VERSIONING_ABI_TAG_SUFFIX}")
+ else(BOOST_VERSIONING_ABI_TAG_PREFIX OR BOOST_VERSIONING_ABI_TAG_SUFFIX)
+ set(BOOST_VERSIONING_ABI_TAG "")
+ endif(BOOST_VERSIONING_ABI_TAG_PREFIX OR BOOST_VERSIONING_ABI_TAG_SUFFIX)
+
+ # Determine the Boost version number for versioning
+ if(BOOST_VERSION_SUBMINOR GREATER 0)
+ set(BOOST_VERSIONING_VERSION
+ "${BOOST_VERSION_MAJOR}_${BOOST_VERSION_MINOR}_${BOOST_VERSION_SUBMINOR}")
+ else(BOOST_VERSION_SUBMINOR GREATER 0)
+ set(BOOST_VERSIONING_VERSION
+ "${BOOST_VERSION_MAJOR}_${BOOST_VERSION_MINOR}")
+ endif(BOOST_VERSION_SUBMINOR GREATER 0)
+
+ set(BOOST_LIBRARY_VERSION_STRING
+ "${BOOST_VERSIONING_TOOLSET_TAG}${BOOST_VERSIONING_ABI_TAG}-${BOOST_VERSIONING_VERSION}")
+ set(BOOST_LIBRARY_VERSION_STRING_DEBUG
+ "${BOOST_VERSIONING_TOOLSET_TAG}${BOOST_VERSIONING_ABI_TAG_DEBUG}-${BOOST_VERSIONING_VERSION}")
+else(USE_VERSIONING)
+ set(BOOST_LIBRARY_VERSION_STRING "")
+ set(BOOST_LIBRARY_VERSION_STRING_DEBUG "")
+endif(USE_VERSIONING)
+
 
 # Defines a Boost library subproject (e.g., for Boost.Python). Use as:
 #
@@ -78,20 +165,31 @@
 macro(boost_library)
   parse_arguments(THIS_LIB
     "DEPENDS;LIBRARIES;COMPILE_FLAGS;STICKY_COMPILE_FLAGS;STATIC_COMPILE_FLAGS;SHARED_COMPILE_FLAGS;STICKY_STATIC_COMPILE_FLAGS;STICKY_STATIC_LINK_FLAGS;STICKY_SHARED_COMPILE_FLAGS;STICKY_SHARED_LINK_FLAGS"
- "NO_STATIC;NO_SHARED"
+ "NO_STATIC;NO_SHARED;STATIC_TAG"
     ${ARGN}
     )
   CAR(libname ${THIS_LIB_DEFAULT_ARGS})
   CDR(sources ${THIS_LIB_DEFAULT_ARGS})
 
   IF(NOT "${THIS_LIB_NO_STATIC}" STREQUAL "TRUE")
+ # If the STATIC_TAG option was provided, we append "-s" to the end
+ # of the target's name, so that it does not conflict with the
+ # dynamic library.
+ if (THIS_LIB_STATIC_TAG)
+ set(THIS_LIB_STATIC_TAG "-s")
+ else(THIS_LIB_STATIC_TAG)
+ set(THIS_LIB_STATIC_TAG "")
+ endif(THIS_LIB_STATIC_TAG)
+
     add_library("${libname}-static" STATIC ${sources})
     set_target_properties("${libname}-static"
       # notice that the static ones have -static added to the lib name.
       # this is to accomodate those who insist on linking to the
       # static varieties even when dynamics are available.
       PROPERTIES
- OUTPUT_NAME "${libname}-static"
+ OUTPUT_NAME "${libname}${BOOST_LIBRARY_VERSION_STRING}${THIS_LIB_STATIC_TAG}"
+ DEBUG_OUTPUT_NAME "${libname}${BOOST_LIBRARY_VERSION_STRING_DEBUG}${THIS_LIB_STATIC_TAG}"
+ RELWITHDEBINFO_OUTPUT_NAME "${libname}${BOOST_LIBRARY_VERSION_STRING_DEBUG}${THIS_LIB_STATIC_TAG}"
       CLEAN_DIRECT_OUTPUT 1
       COMPILE_FLAGS "${THIS_LIB_COMPILE_FLAGS} ${THIS_LIB_STICKY_COMPILE_FLAGS} ${THIS_LIB_STATIC_COMPILE_FLAGS} ${THIS_LIB_STICKY_STATIC_COMPILE_FLAGS}"
       STICKY_COMPILE_FLAGS "${THIS_LIB_STICKY_COMPILE_FLAGS} ${THIS_LIB_STICKY_STATIC_COMPILE_FLAGS}"
@@ -113,7 +211,10 @@
   IF(NOT "${THIS_LIB_NO_SHARED}" STREQUAL "TRUE")
     add_library("${libname}-shared" SHARED ${sources})
     set_target_properties("${libname}-shared"
- PROPERTIES OUTPUT_NAME "${libname}"
+ PROPERTIES
+ OUTPUT_NAME "${libname}${BOOST_LIBRARY_VERSION_STRING}"
+ DEBUG_OUTPUT_NAME "${libname}${BOOST_LIBRARY_VERSION_STRING_DEBUG}"
+ RELWITHDEBINFO_OUTPUT_NAME "${libname}${BOOST_LIBRARY_VERSION_STRING_DEBUG}"
       CLEAN_DIRECT_OUTPUT 1
       COMPILE_FLAGS "${THIS_LIB_COMPILE_FLAGS} ${THIS_LIB_STICKY_COMPILE_FLAGS} ${THIS_LIB_SHARED_COMPILE_FLAGS} ${THIS_LIB_STICKY_SHARED_COMPILE_FLAGS}"
       STICKY_COMPILE_FLAGS "${THIS_LIB_STICKY_COMPILE_FLAGS} ${THIS_LIB_STICKY_SHARED_COMPILE_FLAGS}"

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/boost-testing.cmake
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/boost-testing.cmake (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/boost-testing.cmake 2007-05-18 02:26:32 EDT (Fri, 18 May 2007)
@@ -36,6 +36,12 @@
 # in cmakeland but we might not like this...
 #
 option(BUILD_TESTING "Enable testing" ON)
+if(BUILD_TESTING)
+ set(NIGHTLY_START_TIME "23:30:00 EDT")
+ set(DROP_METHOD "xmlrpc")
+ set(DROP_SITE "http://public.kitware.com:8081")
+ set(DROP_LOCATION "boost")
+endif(BUILD_TESTING)
 include(CTest)
 
 macro(boost_test_parse_args testname)


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