|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2007-05-22 15:49:27
Author: dgregor
Date: 2007-05-22 15:49:26 EDT (Tue, 22 May 2007)
New Revision: 4188
URL: http://svn.boost.org/trac/boost/changeset/4188
Log:
Several tweaks to improve building and autolinking support on Windows, with Visual C++ 8.0
Text files modified:
sandbox/troy/boost_1_34_0/CMakeLists.txt | 10 +++++++++-
sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake | 19 +++++++++++++++----
2 files changed, 24 insertions(+), 5 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-22 15:49:26 EDT (Tue, 22 May 2007)
@@ -8,7 +8,7 @@
# Boost version
set(BOOST_VERSION_MAJOR 1)
-set(BOOST_VERSION_MINOR 35)
+set(BOOST_VERSION_MINOR 34)
set(BOOST_VERSION_SUBMINOR 0)
set(BOOST_VERSION "${BOOST_VERSION_MAJOR}.${BOOST_VERSION_MINOR}.${BOOST_VERSION_SUBMINOR}")
@@ -18,6 +18,14 @@
# Whether to build shared libraries
option(BUILD_SHARED_LIBS "Whether to build shared libraries" ON)
+# Whether to enable threading
+if(MSVC)
+ set(DEFAULT_ENABLE_THREADING ON)
+elseif(MSVC)
+ set(DEFAULT_ENABLE_THREADING OFF)
+endif(MSVC)
+option(ENABLE_THREADING "Whether to enable threading" ${DEFAULT_ENABLE_THREADING})
+
# Always include the Boost source directory, so that we can find
# include files in boost/
include_directories(${Boost_SOURCE_DIR})
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-22 15:49:26 EDT (Tue, 22 May 2007)
@@ -80,7 +80,12 @@
set(BOOST_LIBRARY_VERSION_STRING "")
set(BOOST_LIBRARY_VERSION_STRING_DEBUG "")
else(NOT BOOST_VERSIONING_TOOLSET_TAG)
- # TODO: Multithreading tag should go here
+ # Multithreading tag
+ if(ENABLE_THREADING)
+ set(BOOST_LIBRARY_MT_TAG "-mt")
+ elseif(ENABLE_THREADING)
+ set(BOOST_LIBRARY_MT_TAG "")
+ endif(ENABLE_THREADING)
# When determining the ABI tag, we need to differentiate between
# what comes before the debug tag ('d') and what comes after,
@@ -116,9 +121,9 @@
endif(BOOST_VERSION_SUBMINOR GREATER 0)
set(BOOST_LIBRARY_VERSION_STRING
- "${BOOST_VERSIONING_TOOLSET_TAG}${BOOST_VERSIONING_ABI_TAG}-${BOOST_VERSIONING_VERSION}")
+ "${BOOST_VERSIONING_TOOLSET_TAG}${BOOST_LIBRARY_MT_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}")
+ "${BOOST_VERSIONING_TOOLSET_TAG}${BOOST_LIBRARY_MT_TAG}${BOOST_VERSIONING_ABI_TAG_DEBUG}-${BOOST_VERSIONING_VERSION}")
endif(NOT BOOST_VERSIONING_TOOLSET_TAG)
else(USE_VERSIONING)
set(BOOST_LIBRARY_VERSION_STRING "")
@@ -233,13 +238,19 @@
set(THIS_LIB_STATIC_TAG "")
endif(THIS_LIB_STATIC_TAG)
+ if(WIN32 AND NOT CYGWIN)
+ set(LIBPREFIX "lib")
+ else(WIN32 AND NOT CYGWIN)
+ set(LIBPREFIX "")
+ endif(WIN32 AND NOT CYGWIN)
+
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}${BOOST_LIBRARY_VERSION_STRING}${THIS_LIB_STATIC_TAG}"
+ OUTPUT_NAME "${LIBPREFIX}${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
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