|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2007-06-08 00:49:21
Author: dgregor
Date: 2007-06-08 00:49:20 EDT (Fri, 08 Jun 2007)
New Revision: 4496
URL: http://svn.boost.org/trac/boost/changeset/4496
Log:
tools/build/CMake/boost-testing.cmake:
- Handle LINK_FLAGS
libs/regex/test/CMakeLists.txt, libs/regex/CMakeLists.txt:
- Regression testing for the regex library
Added:
sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/test/CMakeLists.txt
Text files modified:
sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/CMakeLists.txt | 1 +
sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/boost-testing.cmake | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
Modified: sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/CMakeLists.txt
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/CMakeLists.txt (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/CMakeLists.txt 2007-06-08 00:49:20 EDT (Fri, 08 Jun 2007)
@@ -1,4 +1,5 @@
boost_library_project(
Regex
SRCDIRS src
+ TESTDIRS test
)
Added: sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/test/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox-branches/boost-cmake/boost_1_34_0/libs/regex/test/CMakeLists.txt 2007-06-08 00:49:20 EDT (Fri, 08 Jun 2007)
@@ -0,0 +1,90 @@
+# TODO: Default to multi-threaded?
+macro(regex_test TESTNAME)
+ parse_arguments(REGEX_TEST "" "" ${ARGN})
+
+ if (REGEX_TEST_DEFAULT_ARGS)
+ set(REGEX_TEST_SOURCES ${REGEX_TEST_DEFAULT_ARGS})
+ else (REGEX_TEST_DEFAULT_ARGS)
+ set(REGEX_TEST_SOURCES "${TESTNAME}.cpp")
+ endif (REGEX_TEST_DEFAULT_ARGS)
+
+ boost_test_run(${TESTNAME} ${REGEX_TEST_SOURCES}
+ COMPILE_FLAGS "-DBOOST_REGEX_DYN_LINK=1"
+ DEPENDS boost_regex-shared)
+endmacro(regex_test)
+
+set(R_SOURCES
+ regress/basic_tests.cpp
+ regress/main.cpp
+ regress/test_alt.cpp
+ regress/test_anchors.cpp
+ regress/test_asserts.cpp
+ regress/test_backrefs.cpp
+ regress/test_deprecated.cpp
+ regress/test_emacs.cpp
+ regress/test_escapes.cpp
+ regress/test_grep.cpp
+ regress/test_locale.cpp
+ regress/test_mfc.cpp
+ regress/test_non_greedy_repeats.cpp
+ regress/test_perl_ex.cpp
+ regress/test_replace.cpp
+ regress/test_sets.cpp
+ regress/test_simple_repeats.cpp
+ regress/test_tricky_cases.cpp
+ regress/test_icu.cpp
+ regress/test_unicode.cpp
+ regress/test_overloads.cpp
+ regress/test_operators.cpp
+ )
+
+boost_test_run(regex_regress ${R_SOURCES} DEPENDS boost_regex-static)
+boost_test_run(regex_regress_dll ${R_SOURCES}
+ COMPILE_FLAGS "-DBOOST_REGEX_DYN_LINK=1"
+ DEPENDS boost_regex-shared)
+boost_test_run(regex_regress_threaded ${R_SOURCES}
+ COMPILE_FLAGS "-DTEST_THREADS -DBOOST_REGEX_DYN_LINK=1 ${MULTI_THREADED_COMPILE_FLAGS}"
+ LINK_FLAGS "${MULTI_THREADED_LINK_FLAGS}"
+ LINK_LIBS "${MULTI_THREADED_LINK_LIBS}"
+ DEPENDS boost_regex-mt-shared boost_thread-mt-shared)
+
+regex_test(posix_api_check c_compiler_checks/posix_api_check.c)
+boost_test_compile(wide_posix_api_check_c c_compiler_checks/wide_posix_api_check.c)
+regex_test(posix_api_check_cpp c_compiler_checks/wide_posix_api_check.cpp)
+regex_test(bad_expression_test pathology/bad_expression_test.cpp)
+regex_test(recursion_test pathology/recursion_test.cpp)
+regex_test(unicode_iterator_test unicode/unicode_iterator_test.cpp)
+
+boost_test_run(static_mutex_test static_mutex/static_mutex_test.cpp
+ COMPILE_FLAGS "-DBOOST_REGEX_DYN_LINK=1 ${MULTI_THREADED_COMPILE_FLAGS}"
+ LINK_FLAGS "${MULTI_THREADED_LINK_FLAGS}"
+ LINK_LIBS "${MULTI_THREADED_LINK_LIBS}"
+ DEPENDS boost_regex-mt-shared boost_thread-mt-shared)
+
+regex_test(object_cache_test object_cache/object_cache_test.cpp)
+boost_test_run(regex_config_info config_info/regex_config_info.cpp
+ DEPENDS boost_regex-static)
+
+boost_test_run(regex_dll_config_info config_info/regex_config_info.cpp
+ COMPILE_FLAGS "-DBOOST_REGEX_DYN_LINK=1"
+ DEPENDS boost_regex-shared)
+
+regex_test(test_collate_info collate_info/collate_info.cpp)
+
+boost_test_compile(concept_check concepts/concept_check.cpp)
+boost_test_compile(ice_concept_check concepts/icu_concept_check.cpp)
+
+# TODO: Deal with this
+ # [ run
+ # sources
+# captures/captures_test.cpp
+ # captures//boost_regex_extra
+ #: # additional args
+ #: # test-files
+ #: # requirements
+ # <threading>multi
+ # <define>BOOST_REGEX_MATCH_EXTRA=1
+ # <define>BOOST_REGEX_NO_LIB=1
+# : # test name
+ # captures_test
+# ]
\ No newline at end of file
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-06-08 00:49:20 EDT (Fri, 08 Jun 2007)
@@ -40,7 +40,7 @@
set(BOOST_TEST_OKAY TRUE)
set(BOOST_TEST_COMPILE_FLAGS "")
parse_arguments(BOOST_TEST
- "LINK_LIBS;DEPENDS;COMPILE_FLAGS;ARGS"
+ "LINK_LIBS;LINK_FLAGS;DEPENDS;COMPILE_FLAGS;ARGS"
""
${ARGN}
)
@@ -83,6 +83,7 @@
set_target_properties(${testname}
PROPERTIES
COMPILE_FLAGS "${BOOST_TEST_COMPILE_FLAGS}"
+ LINK_FLAGS "${BOOST_TEST_LINK_FLAGS}"
OUTPUT_NAME ${PROJECT_NAME}/${testname})
target_link_libraries(${testname} ${BOOST_TEST_DEPENDS})
target_link_libraries(${testname} ${BOOST_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