Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2007-06-05 10:32:24


Author: troy
Date: 2007-06-05 10:32:23 EDT (Tue, 05 Jun 2007)
New Revision: 4455
URL: http://svn.boost.org/trac/boost/changeset/4455

Log:

add (variant)_LINK_LIBS global for setting per-variant global libs.
*_LINK_FLAGS won't do it as these FLAGS are put at the very beginning
of the link line, not the end

 

Text files modified:
   sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake | 5 +++--
   sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-core.cmake | 10 ++--------
   2 files changed, 5 insertions(+), 10 deletions(-)

Modified: sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake 2007-06-05 10:32:23 EDT (Tue, 05 Jun 2007)
@@ -96,7 +96,8 @@
   # No threading options necessary for Mac OS X
 elseif(UNIX)
   # Assume -pthread and -lrt on all other variants
- set(MULTI_THREADED_COMPILE_FLAGS "-pthread")
- set(MULTI_THREADED_LINK_FLAGS "-lpthread -lrt")
+ set(MULTI_THREADED_COMPILE_FLAGS "-pthread -D_REENTRANT")
+ set(MULTI_THREADED_LINK_FLAGS "")
+ set(MULTI_THREADED_LINK_LIBS pthread rt)
 endif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
 

Modified: sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-core.cmake
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-core.cmake (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-core.cmake 2007-06-05 10:32:23 EDT (Tue, 05 Jun 2007)
@@ -79,14 +79,6 @@
   endif(${BOOST_BUILD_LIB_OPTION})
 endmacro(boost_library_project)
 
-macro(push_back_target_property target property pushvalue)
- get_target_property(oldvalue ${target} ${property})
- if(NOT oldvalue)
- set(oldvalue "")
- endif(NOT oldvalue)
- set_target_properties(${target} PROPERTIES ${property} "${oldvalue} ${pushvalue}")
-endmacro(push_back_target_property target property pushvalue)
-
 macro(boost_library_variant_target_name)
   set(VARIANT_TARGET_NAME "")
   set(VARIANT_VERSIONED_NAME "")
@@ -176,6 +168,7 @@
     # Accumulate compile and link flags
     set(THIS_VARIANT_COMPILE_FLAGS "${THIS_VARIANT_COMPILE_FLAGS} ${THIS_LIB_${ARG}_COMPILE_FLAGS} ${${ARG}_COMPILE_FLAGS}")
     set(THIS_VARIANT_LINK_FLAGS "${THIS_VARIANT_LINK_FLAGS} ${THIS_LIB_${ARG}_LINK_FLAGS} ${${ARG}_LINK_FLAGS}")
+ set(THIS_VARIANT_LINK_LIBS "${${ARG}_LINK_LIBS}")
   endforeach(ARG ${ARGN})
 
   if (THIS_VARIANT_OKAY)
@@ -262,6 +255,7 @@
       target_link_libraries(${VARIANT_LIBNAME} "${dependency}${VARIANT_TARGET_NAME}")
     endforeach(dependency "${THIS_LIB_DEPENDS}")
 
+ target_link_libraries(${VARIANT_LIBNAME} ${THIS_VARIANT_LINK_LIBS})
     # Installation of this library variant
     install(TARGETS ${VARIANT_LIBNAME} DESTINATION lib)
   endif (THIS_VARIANT_OKAY)


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