|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2008-07-18 11:54:01
Author: dgregor
Date: 2008-07-18 11:54:00 EDT (Fri, 18 Jul 2008)
New Revision: 47570
URL: http://svn.boost.org/trac/boost/changeset/47570
Log:
Update Config tests and fix some issues with boost_test_run not passing arguments through
Text files modified:
branches/CMake/release/libs/config/test/CMakeLists.txt | 274 +++------------------------------------
branches/CMake/release/tools/build/CMake/BoostTesting.cmake | 6
2 files changed, 30 insertions(+), 250 deletions(-)
Modified: branches/CMake/release/libs/config/test/CMakeLists.txt
==============================================================================
--- branches/CMake/release/libs/config/test/CMakeLists.txt (original)
+++ branches/CMake/release/libs/config/test/CMakeLists.txt 2008-07-18 11:54:00 EDT (Fri, 18 Jul 2008)
@@ -1,255 +1,33 @@
-#
-# Regression test rules for Boost configuration setup.
-# *** DO NOT EDIT THIS FILE BY HAND ***
-# This file was automatically generated on Fri May 18 22:13:10 2007
-# by libs/config/tools/generate.cpp
# Copyright John Maddock and Douglas Gregor.
# Use, modification and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-macro(boost_configure what var)
- file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${what}.ipp SRC)
- check_cxx_source_compiles("${SRC} int main(int, char**) { }" tmp)
- set(${var} ${tmp})
-endmacro(boost_configure what)
-
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/main.cpp "int main(int, char**) { }")
-
-#
-# it would seem a lot easier to do this kind of thing here and write a config.h at build time
-# rather than checking all this stuff in
-#
-
-boost_configure(boost_has_pthread_yield BOOST_HAS_PTHREAD_YIELD)
-# boost_configure(boost_has_nanosleep BOOST_HAS_NANOSLEEP)
-# boost_configure(boost_has_pthread_ma_st BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE)
-# boost_configure(boost_no_ded_typename BOOST_DEDUCED_TYPENAME)
-
-set(vars "BOOST_HAS_PTHREAD_YIELD")
-foreach(var ${vars})
- if(${var})
- add_definitions(-D${var})
- endif(${var})
-endforeach(var ${vars})
-
-boost_test_run(config_info)
-boost_test_run(math_info)
-
-
-# if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-# set(threadlibs "LIBRARIES;pthread;rt")
-# endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-# these aren't really tests anyway
-#set(tests_need_threadlibs config_test has_clock_gettime_pass has_pthread_ma_st_pass has_pthread_yield_pass)
-#foreach(test ${tests_need_threadlibs})
-# boost_test_run(${test})
-#endforeach(test ${tests_need_threadlibs})
-
-
+if(MSVC)
+ set(BOOST_CONFIG_MSVC_STATIC_OPTIONS STATIC STATIC_RUNTIME)
+endif(MSVC)
+if(BORLAND)
+ set(BOOST_CONFIG_BORLAND_STATIC_OPTIONS STATIC STATIC_RUNTIME)
+endif(BORLAND)
+
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ set(BOOST_CONFIG_STATIC_THREAD_LIBS LINK_LIBS pthread rt)
+ message(STATUS "Extra libraries on Linux = ${BOOST_CONFIG_STATIC_THREAD_LIBS}")
+endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
+boost_test_run(config_test_threaded config_test.cpp
+ EXTRA_OPTIONS MULTI_THREADED)
+boost_test_run(config_test
+ EXTRA_OPTIONS SINGLE_THREADED ${BOOST_CONFIG_MSVC_STATIC_OPTIONS}
+ ${BOOST_CONFIG_STATIC_THREAD_LIBS})
+boost_test_run(config_info_threaded config_info.cpp
+ EXTRA_OPTIONS MULTI_THREADED)
+boost_test_run(config_info
+ EXTRA_OPTIONS SINGLE_THREADED ${BOOST_CONFIG_MSVC_STATIC_OPTIONS})
+boost_test_run(math_info
+ EXTRA_OPTIONS ${BOOST_CONFIG_BORLAND_STATIC_OPTIONS})
boost_test_run(limits_test DEPENDS boost_test_exec_monitor)
boost_test_run(abi_test abi/abi_test.cpp abi/main.cpp)
-boost_test_run(has_2arg_use_facet_pass)
-boost_test_compile_fail(has_2arg_use_facet_fail)
-boost_test_run(has_bethreads_pass)
-boost_test_compile_fail(has_bethreads_fail)
-boost_test_compile_fail(has_clock_gettime_fail)
-boost_test_run(has_dirent_h_pass)
-boost_test_compile_fail(has_dirent_h_fail)
-boost_test_run(has_expm1_pass)
-boost_test_compile_fail(has_expm1_fail)
-boost_test_run(has_ftime_pass)
-boost_test_compile_fail(has_ftime_fail)
-boost_test_run(has_gettimeofday_pass)
-boost_test_compile_fail(has_gettimeofday_fail)
-boost_test_run(has_hash_pass)
-boost_test_compile_fail(has_hash_fail)
-boost_test_run(has_log1p_pass)
-boost_test_compile_fail(has_log1p_fail)
-boost_test_run(has_long_long_pass)
-boost_test_compile_fail(has_long_long_fail)
-boost_test_run(has_macro_use_facet_pass)
-boost_test_compile_fail(has_macro_use_facet_fail)
-boost_test_run(has_ms_int64_pass)
-boost_test_compile_fail(has_ms_int64_fail)
-boost_test_run(has_nanosleep_pass)
-boost_test_compile_fail(has_nanosleep_fail)
-boost_test_run(has_nl_types_h_pass)
-boost_test_compile_fail(has_nl_types_h_fail)
-boost_test_run(has_nrvo_pass)
-boost_test_compile_fail(has_nrvo_fail)
-boost_test_run(has_part_alloc_pass)
-boost_test_compile_fail(has_part_alloc_fail)
-boost_test_run(has_pthread_delay_np_pass)
-boost_test_compile_fail(has_pthread_delay_np_fail)
-
-boost_test_compile_fail(has_pthread_ma_st_fail)
-boost_test_compile_fail(has_pthread_yield_fail)
-boost_test_run(has_pthreads_pass)
-boost_test_compile_fail(has_pthreads_fail)
-boost_test_run(has_sched_yield_pass)
-boost_test_compile_fail(has_sched_yield_fail)
-boost_test_run(has_sgi_type_traits_pass)
-boost_test_compile_fail(has_sgi_type_traits_fail)
-boost_test_run(has_sigaction_pass)
-boost_test_compile_fail(has_sigaction_fail)
-boost_test_run(has_slist_pass)
-boost_test_compile_fail(has_slist_fail)
-boost_test_run(has_stdint_h_pass)
-boost_test_compile_fail(has_stdint_h_fail)
-boost_test_run(has_stlp_use_facet_pass)
-boost_test_compile_fail(has_stlp_use_facet_fail)
-boost_test_run(has_tr1_array_pass)
-boost_test_compile_fail(has_tr1_array_fail)
-boost_test_run(has_tr1_bind_pass)
-boost_test_compile_fail(has_tr1_bind_fail)
-boost_test_run(has_tr1_complex_over_pass)
-boost_test_compile_fail(has_tr1_complex_over_fail)
-boost_test_run(has_tr1_complex_trig_pass)
-boost_test_compile_fail(has_tr1_complex_trig_fail)
-boost_test_run(has_tr1_function_pass)
-boost_test_compile_fail(has_tr1_function_fail)
-boost_test_run(has_tr1_hash_pass)
-boost_test_compile_fail(has_tr1_hash_fail)
-boost_test_run(has_tr1_mem_fn_pass)
-boost_test_compile_fail(has_tr1_mem_fn_fail)
-boost_test_run(has_tr1_random_pass)
-boost_test_compile_fail(has_tr1_random_fail)
-boost_test_run(has_tr1_ref_wrap_pass)
-boost_test_compile_fail(has_tr1_ref_wrap_fail)
-boost_test_run(has_tr1_regex_pass)
-boost_test_compile_fail(has_tr1_regex_fail)
-boost_test_run(has_tr1_result_of_pass)
-boost_test_compile_fail(has_tr1_result_of_fail)
-boost_test_run(has_tr1_shared_ptr_pass)
-boost_test_compile_fail(has_tr1_shared_ptr_fail)
-boost_test_run(has_tr1_tuple_pass)
-boost_test_compile_fail(has_tr1_tuple_fail)
-boost_test_run(has_tr1_type_traits_pass)
-boost_test_compile_fail(has_tr1_type_traits_fail)
-boost_test_run(has_tr1_unordered_map_pass)
-boost_test_compile_fail(has_tr1_unordered_map_fail)
-boost_test_run(has_tr1_unordered_set_pass)
-boost_test_compile_fail(has_tr1_unordered_set_fail)
-boost_test_run(has_tr1_utility_pass)
-boost_test_compile_fail(has_tr1_utility_fail)
-boost_test_run(has_unistd_h_pass)
-boost_test_compile_fail(has_unistd_h_fail)
-boost_test_run(has_vc6_mem_templ_pass)
-boost_test_compile_fail(has_vc6_mem_templ_fail)
-boost_test_run(has_vc_iterator_pass)
-boost_test_compile_fail(has_vc_iterator_fail)
-boost_test_run(has_winthreads_pass)
-boost_test_compile_fail(has_winthreads_fail)
-boost_test_run(no_arg_dep_lookup_pass)
-boost_test_compile_fail(no_arg_dep_lookup_fail)
-boost_test_run(no_array_type_spec_pass)
-boost_test_compile_fail(no_array_type_spec_fail)
-boost_test_run(no_auto_ptr_pass)
-boost_test_compile_fail(no_auto_ptr_fail)
-boost_test_run(no_bcb_partial_spec_pass)
-boost_test_compile_fail(no_bcb_partial_spec_fail)
-boost_test_run(no_ctype_functions_pass)
-boost_test_compile_fail(no_ctype_functions_fail)
-boost_test_run(no_cv_spec_pass)
-boost_test_compile_fail(no_cv_spec_fail)
-boost_test_run(no_cv_void_spec_pass)
-boost_test_compile_fail(no_cv_void_spec_fail)
-boost_test_run(no_cwchar_pass)
-boost_test_compile_fail(no_cwchar_fail)
-boost_test_run(no_cwctype_pass)
-boost_test_compile_fail(no_cwctype_fail)
-boost_test_run(no_ded_typename_pass)
-boost_test_compile_fail(no_ded_typename_fail)
-boost_test_run(no_dep_nested_class_pass)
-boost_test_compile_fail(no_dep_nested_class_fail)
-boost_test_run(no_dep_val_param_pass)
-boost_test_compile_fail(no_dep_val_param_fail)
-boost_test_run(no_excep_std_pass)
-boost_test_compile_fail(no_excep_std_fail)
-boost_test_run(no_exceptions_pass)
-boost_test_compile_fail(no_exceptions_fail)
-boost_test_run(no_exp_func_tem_arg_pass)
-boost_test_compile_fail(no_exp_func_tem_arg_fail)
-boost_test_run(no_func_tmp_order_pass)
-boost_test_compile_fail(no_func_tmp_order_fail)
-boost_test_run(no_i64_limits_pass)
-boost_test_compile_fail(no_i64_limits_fail)
-boost_test_run(no_inline_memb_init_pass)
-boost_test_compile_fail(no_inline_memb_init_fail)
-boost_test_run(no_integral_int64_t_pass)
-boost_test_compile_fail(no_integral_int64_t_fail)
-boost_test_run(no_is_abstract_pass)
-boost_test_compile_fail(no_is_abstract_fail)
-boost_test_run(no_iter_construct_pass)
-boost_test_compile_fail(no_iter_construct_fail)
-boost_test_run(no_limits_pass)
-boost_test_compile_fail(no_limits_fail)
-boost_test_run(no_limits_const_exp_pass)
-boost_test_compile_fail(no_limits_const_exp_fail)
-boost_test_run(no_ll_limits_pass)
-boost_test_compile_fail(no_ll_limits_fail)
-boost_test_run(no_mem_func_spec_pass)
-boost_test_compile_fail(no_mem_func_spec_fail)
-boost_test_run(no_mem_tem_keyword_pass)
-boost_test_compile_fail(no_mem_tem_keyword_fail)
-boost_test_run(no_mem_tem_pnts_pass)
-boost_test_compile_fail(no_mem_tem_pnts_fail)
-boost_test_run(no_mem_templ_frnds_pass)
-boost_test_compile_fail(no_mem_templ_frnds_fail)
-boost_test_run(no_mem_templates_pass)
-boost_test_compile_fail(no_mem_templates_fail)
-boost_test_run(no_ops_in_namespace_pass)
-boost_test_compile_fail(no_ops_in_namespace_fail)
-boost_test_run(no_partial_spec_pass)
-boost_test_compile_fail(no_partial_spec_fail)
-boost_test_run(no_priv_aggregate_pass)
-boost_test_compile_fail(no_priv_aggregate_fail)
-boost_test_run(no_ptr_mem_const_pass)
-boost_test_compile_fail(no_ptr_mem_const_fail)
-boost_test_run(no_ret_det_pass)
-boost_test_compile_fail(no_ret_det_fail)
-boost_test_run(no_sfinae_pass)
-boost_test_compile_fail(no_sfinae_fail)
-boost_test_run(no_sstream_pass)
-boost_test_compile_fail(no_sstream_fail)
-boost_test_run(no_std_allocator_pass)
-boost_test_compile_fail(no_std_allocator_fail)
-boost_test_run(no_std_distance_pass)
-boost_test_compile_fail(no_std_distance_fail)
-boost_test_run(no_std_iter_traits_pass)
-boost_test_compile_fail(no_std_iter_traits_fail)
-boost_test_run(no_std_iterator_pass)
-boost_test_compile_fail(no_std_iterator_fail)
-boost_test_run(no_std_locale_pass)
-boost_test_compile_fail(no_std_locale_fail)
-boost_test_run(no_std_messages_pass)
-boost_test_compile_fail(no_std_messages_fail)
-boost_test_run(no_std_min_max_pass)
-boost_test_compile_fail(no_std_min_max_fail)
-boost_test_run(no_std_oi_assign_pass)
-boost_test_compile_fail(no_std_oi_assign_fail)
-boost_test_run(no_std_use_facet_pass)
-boost_test_compile_fail(no_std_use_facet_fail)
-boost_test_run(no_std_wstreambuf_pass)
-boost_test_compile_fail(no_std_wstreambuf_fail)
-boost_test_run(no_std_wstring_pass)
-boost_test_compile_fail(no_std_wstring_fail)
-boost_test_run(no_stdc_namespace_pass)
-boost_test_compile_fail(no_stdc_namespace_fail)
-boost_test_run(no_swprintf_pass)
-boost_test_compile_fail(no_swprintf_fail)
-boost_test_run(no_template_template_pass)
-boost_test_compile_fail(no_template_template_fail)
-boost_test_run(no_using_breaks_adl_pass)
-boost_test_compile_fail(no_using_breaks_adl_fail)
-boost_test_run(no_using_decl_overld_pass)
-boost_test_compile_fail(no_using_decl_overld_fail)
-boost_test_run(no_using_template_pass)
-boost_test_compile_fail(no_using_template_fail)
-boost_test_run(no_void_returns_pass)
-boost_test_compile_fail(no_void_returns_fail)
-boost_test_run(no_wchar_t_pass)
-boost_test_compile_fail(no_wchar_t_fail)
-
+# TODO: config_link_test
+boost_test_compile_fail(test_thread_fail1 threads/test_thread_fail1.cpp)
+boost_test_compile_fail(test_thread_fail2 threads/test_thread_fail2.cpp)
\ No newline at end of file
Modified: branches/CMake/release/tools/build/CMake/BoostTesting.cmake
==============================================================================
--- branches/CMake/release/tools/build/CMake/BoostTesting.cmake (original)
+++ branches/CMake/release/tools/build/CMake/BoostTesting.cmake 2008-07-18 11:54:00 EDT (Fri, 18 Jul 2008)
@@ -207,15 +207,17 @@
boost_add_executable(${testname} ${BOOST_TEST_SOURCES}
OUTPUT_NAME tests/${PROJECT_NAME}/${testname}
DEPENDS "${BOOST_TEST_DEPENDS}"
+ LINK_LIBS ${BOOST_TEST_LINK_LIBS}
+ LINK_FLAGS ${BOOST_TEST_LINK_FLAGS}
+ COMPILE_FLAGS ${BOOST_TEST_COMPILE_FLAGS}
NO_INSTALL
${BOOST_TEST_EXTRA_OPTIONS})
if (THIS_EXE_OKAY)
-
# This target builds and runs the test
add_custom_target(${BOOST_TEST_TESTNAME})
- file( TO_NATIVE_PATH "${BOOST_TEST_DRIVER}" NATIVE_BOOST_TEST_DRIVER )
+ file( TO_NATIVE_PATH "${BOOST_TEST_DRIVER}" NATIVE_BOOST_TEST_DRIVER )
set(THIS_TEST_PREFIX_ARGS
${PYTHON_EXECUTABLE} ${NATIVE_BOOST_TEST_DRIVER} ${CMAKE_CURRENT_BINARY_DIR} ${BOOST_TEST_TAG} ${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