|
Boost-Commit : |
From: troy_at_[hidden]
Date: 2007-05-28 15:38:17
Author: troy
Date: 2007-05-28 15:38:16 EDT (Mon, 28 May 2007)
New Revision: 4336
URL: http://svn.boost.org/trac/boost/changeset/4336
Log:
Last commit was unnecessary: tests were getting dropped on the dartboard itself
Text files modified:
sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-core.cmake | 4 ++++
sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-testing.cmake | 32 ++++++++++++--------------------
2 files changed, 16 insertions(+), 20 deletions(-)
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-05-28 15:38:16 EDT (Mon, 28 May 2007)
@@ -177,6 +177,10 @@
string(TOLOWER "${libname_}" libname)
project(${libname})
+ if(NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME})
+ file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME})
+ endif(NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME})
+
# currently src and testdirs are irrelevant. At one point it seemed
# that they would need to be kept separate and scanned in order
# CLEANUP: put src/test dirs back together again, if no future
Modified: sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-testing.cmake
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-testing.cmake (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-testing.cmake 2007-05-28 15:38:16 EDT (Mon, 28 May 2007)
@@ -32,15 +32,12 @@
#
# these macros format the displayed name of the test as PROJECT_NAME::testname
# where PROJECT_NAME is a global set by the cmake PROJECT macro
-# inside boost_library_subproject.
+# inside boost_library_subproject. this use of a global (hrm) is standard practice
+# in cmakeland but we might not like this...
#
option(BUILD_TESTING "Enable testing" OFF)
include(CTest)
-if(BUILD_TESTING)
- file(MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/test)
-endif(BUILD_TESTING)
-
macro(boost_test_parse_args testname)
set(BOOST_TEST_OKAY TRUE)
set(BOOST_TEST_COMPILE_FLAGS "")
@@ -76,15 +73,14 @@
-macro(boost_test_run testname_)
- boost_test_parse_args(${testname_} ${ARGN})
+macro(boost_test_run testname)
+ boost_test_parse_args(${testname} ${ARGN})
if (BOOST_TEST_OKAY)
- set(testname "${PROJECT_NAME}-${testname_}")
add_executable(${testname} ${BOOST_TEST_SOURCES})
set_target_properties(${testname}
PROPERTIES
COMPILE_FLAGS "${BOOST_TEST_COMPILE_FLAGS}"
- OUTPUT_NAME test/${testname})
+ OUTPUT_NAME ${PROJECT_NAME}/${testname})
target_link_libraries(${testname} ${BOOST_TEST_DEPENDS})
target_link_libraries(${testname} ${BOOST_TEST_LIBRARIES})
foreach(_depend ${BOOST_TEST_DEPENDS})
@@ -95,34 +91,30 @@
TO_PROPNAME COMPILE_FLAGS
)
endforeach(_depend ${BOOST_TEST_DEPENDS})
- add_test("${PROJECT_NAME}::${testname_}" ${EXECUTABLE_OUTPUT_PATH}/test/${testname} ${BOOST_TEST_ARGS})
+ add_test("${PROJECT_NAME}::${testname}" ${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME}/${testname} ${BOOST_TEST_ARGS})
endif(BOOST_TEST_OKAY)
-endmacro(boost_test_run testname_)
+endmacro(boost_test_run)
-macro(boost_test_run_fail testname_)
- boost_test_parse_args(${testname_} ${ARGN})
- set(testname "${PROJECT_NAME}-${testname_}")
+macro(boost_test_run_fail testname)
+ boost_test_parse_args(${testname} ${ARGN})
if(BOOST_TEST_OKAY)
add_executable(${testname} ${BOOST_TEST_SOURCES})
set_target_properties(${testname}
PROPERTIES
COMPILE_FLAGS "${BOOST_TEST_COMPILE_FLAGS}"
- OUTPUT_NAME test/${testname})
+ OUTPUT_NAME ${PROJECT_NAME}/${testname})
target_link_libraries(${testname} ${BOOST_TEST_DEPENDS})
target_link_libraries(${testname} ${BOOST_TEST_LIBRARIES})
- add_test("${PROJECT_NAME}::${testname}" ${EXECUTABLE_OUTPUT_PATH}/test/${testname} ${BOOST_TEST_ARGS})
+ add_test("${PROJECT_NAME}::${testname}" ${EXECUTABLE_OUTPUT_PATH}/${PROJECT_NAME}/${testname} ${BOOST_TEST_ARGS})
set_tests_properties("${PROJECT_NAME}::${testname}" PROPERTIES WILL_FAIL TRUE)
endif(BOOST_TEST_OKAY)
endmacro(boost_test_run_fail)
-#
-# This test will always be listed as "not run"
-#
macro(boost_test_fail testname)
- add_test("${PROJECT_NAME}::${testname}" nonexistent_binary)
+ add_test("${PROJECT_NAME}::${testname}" false)
endmacro(boost_test_fail)
macro(boost_test_compile 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