|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53140 - in branches/release: libs/asio/test tools/build/CMake tools/build/CMake/LinkTest
From: troy_at_[hidden]
Date: 2009-05-20 14:33:40
Author: troy
Date: 2009-05-20 14:33:38 EDT (Wed, 20 May 2009)
New Revision: 53140
URL: http://svn.boost.org/trac/boost/changeset/53140
Log:
This makes asio link tests pass, accomplishes two things:
* Communicates CMAKE_CXX_COMPILER correctly to subprocess (via
load_cache which may be a bad idea)
* Manually (yuck) pulls the paths of libraries that the link tests
must link against out of the target properties and passes them to
the linktest subprocess
Text files modified:
branches/release/libs/asio/test/CMakeLists.txt | 30 ++++++++++++++++--------------
branches/release/tools/build/CMake/BoostTesting.cmake | 9 +++++++++
branches/release/tools/build/CMake/LinkTest/CMakeLists.txt | 7 ++++++-
3 files changed, 31 insertions(+), 15 deletions(-)
Modified: branches/release/libs/asio/test/CMakeLists.txt
==============================================================================
--- branches/release/libs/asio/test/CMakeLists.txt (original)
+++ branches/release/libs/asio/test/CMakeLists.txt 2009-05-20 14:33:38 EDT (Wed, 20 May 2009)
@@ -29,31 +29,33 @@
set (USE_SELECT "-DBOOST_ASIO_DISABLE_DEV_POLL -DBOOST_ASIO_DISABLE_EPOLL -DBOOST_ASIO_DISABLE_KQUEUE -DBOOST_ASIO_DISABLE_IOCP")
-set (depends "boost_system;boost_date_time;boost_thread")
+set (depends "boost_system-mt-static;boost_date_time-mt-static;boost_thread-mt-static")
set (os_defines "${os_defines} -DBOOST_ALL_NO_LIB=1")
macro(asio_test_run NAME)
- boost_test_run(${NAME} ${NAME}.cpp
- COMPILE_FLAGS "${os_defines}"
- LINK_LIBS "${dep_libs}"
+ boost_test_run(${NAME} ${NAME}.cpp
+ COMPILE_FLAGS "${os_defines}"
+ LINK_LIBS "${dep_libs}"
DEPENDS ${depends}
)
- boost_test_run(${NAME}_select ${NAME}.cpp
- COMPILE_FLAGS "${os_defines} ${USE_SELECT}"
- LINK_LIBS "${dep_libs}"
+ boost_test_run(${NAME}_select ${NAME}.cpp
+ COMPILE_FLAGS "${os_defines} ${USE_SELECT}"
+ LINK_LIBS "${dep_libs}"
DEPENDS ${depends}
)
endmacro(asio_test_run)
macro(asio_test_link NAME)
- boost_test_link(${NAME} ${NAME}.cpp
- COMPILE_FLAGS "${os_defines}"
- LINK_LIBS "${dep_libs};${depends}"
- )
- boost_test_link(${NAME}_select ${NAME}.cpp
- COMPILE_FLAGS "${os_defines} ${USE_SELECT}"
- LINK_LIBS "${dep_libs}:${depends}"
+ boost_test_link(${NAME} ${NAME}.cpp
+ COMPILE_FLAGS "${os_defines}"
+ LINK_LIBS "${dep_libs}"
+ DEPENDS "${depends}"
+ )
+ boost_test_link(${NAME}_select ${NAME}.cpp
+ COMPILE_FLAGS "${os_defines} ${USE_SELECT}"
+ LINK_LIBS "${dep_libs}"
+ DEPENDS "${depends}"
)
endmacro(asio_test_link)
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-20 14:33:38 EDT (Wed, 20 May 2009)
@@ -410,6 +410,13 @@
set(BOOST_TEST_INCLUDES "${BOOST_TEST_INCLUDES};${DIR}")
endforeach(DIR ${BOOST_TEST_INCLUDE_DIRS})
+ set(TARGET_LINK_LIBRARIES_LIST "")
+ foreach(DEP ${BOOST_TEST_DEPENDS})
+ get_target_property(THISONE_LOCATION ${DEP} LOCATION)
+ list(APPEND TARGET_LINK_LIBRARIES_LIST ${THISONE_LOCATION})
+ endforeach()
+
+
add_test(${BOOST_TEST_TESTNAME}
${CMAKE_CTEST_COMMAND}
--build-and-test
@@ -419,9 +426,11 @@
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project LinkTest
--build-options
+ "-DPARENT_BINARY_DIR:FILEPATH=${CMAKE_CACHEFILE_DIR}"
"-DSOURCE:STRING=${CMAKE_CURRENT_SOURCE_DIR}/${BOOST_TEST_SOURCES}"
"-DINCLUDES:STRING=${BOOST_TEST_INCLUDES}"
"-DCOMPILE_FLAGS:STRING=${BOOST_TEST_COMPILE_FLAGS}"
+ "-DLINK_LIBS:STRING=${BOOST_TEST_LINK_LIBS};${TARGET_LINK_LIBRARIES_LIST}"
)
set_tests_properties(${BOOST_TEST_TESTNAME}
Modified: branches/release/tools/build/CMake/LinkTest/CMakeLists.txt
==============================================================================
--- branches/release/tools/build/CMake/LinkTest/CMakeLists.txt (original)
+++ branches/release/tools/build/CMake/LinkTest/CMakeLists.txt 2009-05-20 14:33:38 EDT (Wed, 20 May 2009)
@@ -1,7 +1,12 @@
cmake_minimum_required(VERSION 2.6)
+load_cache(${PARENT_BINARY_DIR})
+
project(LinkTest)
include_directories (${INCLUDES})
add_executable(link-test ${SOURCE})
set_source_files_properties(${SOURCE}
- PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}")
\ No newline at end of file
+ PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}")
+
+target_link_libraries(link-test
+ ${LINK_LIBS})
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