]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/histogram/test/CMakeLists.txt
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / histogram / test / CMakeLists.txt
CommitLineData
92f5a8d4
TL
1# Copyright Hans Dembinski 2019
2# Distributed under the Boost Software License, Version 1.0.
3# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
4
f67539c2
TL
5find_package(PythonInterp)
6if (PYTHONINTERP_FOUND)
7 # checks that b2 and cmake are in sync
8 add_test(NAME runpy-${PROJECT_NAME}_check_build_system COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_build_system.py)
92f5a8d4 9
f67539c2
TL
10 # checks that all headers are included in odr test
11 add_test(NAME runpy-${PROJECT_NAME}_check_odr_test COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_odr_test.py)
12endif()
13
14include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
15if(NOT HAVE_BOOST_TEST)
16 return()
17endif()
92f5a8d4 18
f67539c2 19set(BOOST_TEST_LINK_LIBRARIES Boost::histogram)
92f5a8d4
TL
20
21# keep in sync with Jamfile, this should be automatized...
f67539c2
TL
22boost_test(TYPE compile-fail SOURCES axis_category_fail0.cpp)
23boost_test(TYPE compile-fail SOURCES axis_category_fail1.cpp)
24boost_test(TYPE compile-fail SOURCES axis_category_fail2.cpp)
25boost_test(TYPE compile-fail SOURCES axis_integer_fail0.cpp)
26boost_test(TYPE compile-fail SOURCES axis_integer_fail1.cpp)
27boost_test(TYPE compile-fail SOURCES axis_integer_fail2.cpp)
28boost_test(TYPE compile-fail SOURCES axis_integer_fail3.cpp)
29boost_test(TYPE compile-fail SOURCES axis_integer_fail4.cpp)
30boost_test(TYPE compile-fail SOURCES axis_regular_fail0.cpp)
31boost_test(TYPE compile-fail SOURCES axis_regular_fail1.cpp)
32boost_test(TYPE compile-fail SOURCES axis_variable_fail0.cpp)
33boost_test(TYPE compile-fail SOURCES axis_variable_fail1.cpp)
34boost_test(TYPE compile-fail SOURCES make_histogram_fail0.cpp)
35boost_test(TYPE compile-fail SOURCES make_histogram_fail1.cpp)
36boost_test(TYPE compile-fail SOURCES histogram_fail0.cpp)
37boost_test(TYPE compile-fail SOURCES histogram_fail1.cpp)
38boost_test(TYPE compile-fail SOURCES histogram_fail2.cpp)
39boost_test(TYPE compile-fail SOURCES histogram_fail3.cpp)
40boost_test(TYPE compile-fail SOURCES histogram_fail4.cpp)
92f5a8d4 41
f67539c2 42set(BOOST_TEST_LINK_LIBRARIES Boost::histogram Boost::core)
92f5a8d4 43
f67539c2
TL
44boost_test(TYPE run SOURCES accumulators_count_test.cpp)
45boost_test(TYPE run SOURCES accumulators_mean_test.cpp)
46boost_test(TYPE run SOURCES accumulators_sum_test.cpp)
47boost_test(TYPE run SOURCES accumulators_thread_safe_test.cpp)
48boost_test(TYPE run SOURCES accumulators_weighted_mean_test.cpp)
49boost_test(TYPE run SOURCES accumulators_weighted_sum_test.cpp)
50boost_test(TYPE run SOURCES algorithm_project_test.cpp)
51boost_test(TYPE run SOURCES algorithm_reduce_test.cpp)
52boost_test(TYPE run SOURCES algorithm_sum_test.cpp)
53boost_test(TYPE run SOURCES algorithm_empty_test.cpp)
20effc67 54boost_test(TYPE run SOURCES axis_boolean_test.cpp)
f67539c2
TL
55boost_test(TYPE run SOURCES axis_category_test.cpp)
56boost_test(TYPE run SOURCES axis_integer_test.cpp)
57boost_test(TYPE run SOURCES axis_option_test.cpp)
58boost_test(TYPE run SOURCES axis_regular_test.cpp)
f67539c2
TL
59boost_test(TYPE run SOURCES axis_traits_test.cpp)
60boost_test(TYPE run SOURCES axis_variable_test.cpp)
61boost_test(TYPE run SOURCES axis_variant_test.cpp)
62boost_test(TYPE run SOURCES detail_accumulator_traits_test.cpp)
63boost_test(TYPE run SOURCES detail_argument_traits_test.cpp)
64boost_test(TYPE run SOURCES detail_args_type_test.cpp)
65boost_test(TYPE run SOURCES detail_axes_test.cpp)
66boost_test(TYPE run SOURCES detail_convert_integer_test.cpp)
67boost_test(TYPE run SOURCES detail_detect_test.cpp)
68boost_test(TYPE run SOURCES detail_limits_test.cpp)
69boost_test(TYPE run SOURCES detail_make_default_test.cpp)
70boost_test(TYPE run SOURCES detail_misc_test.cpp)
71boost_test(TYPE run SOURCES detail_large_int_test.cpp)
72boost_test(TYPE run SOURCES detail_iterator_adaptor_test.cpp)
73boost_test(TYPE run SOURCES detail_operators_test.cpp)
74boost_test(TYPE run SOURCES detail_relaxed_equal_test.cpp)
75boost_test(TYPE run SOURCES detail_replace_type_test.cpp)
76boost_test(TYPE run SOURCES detail_safe_comparison_test.cpp)
77boost_test(TYPE run SOURCES detail_static_if_test.cpp)
78boost_test(TYPE run SOURCES detail_tuple_slice_test.cpp)
79boost_test(TYPE run SOURCES histogram_custom_axis_test.cpp)
80boost_test(TYPE run SOURCES histogram_dynamic_test.cpp)
81boost_test(TYPE run SOURCES histogram_fill_test.cpp
82 COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
83boost_test(TYPE run SOURCES histogram_growing_test.cpp)
84boost_test(TYPE run SOURCES histogram_mixed_test.cpp)
20effc67
TL
85boost_test(TYPE run SOURCES histogram_operators_test.cpp
86 COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
f67539c2
TL
87boost_test(TYPE run SOURCES histogram_ostream_test.cpp)
88boost_test(TYPE run SOURCES histogram_test.cpp)
89boost_test(TYPE run SOURCES indexed_test.cpp)
90boost_test(TYPE run SOURCES storage_adaptor_test.cpp)
91boost_test(TYPE run SOURCES unlimited_storage_test.cpp)
92boost_test(TYPE run SOURCES utility_test.cpp)
93
94find_package(Threads)
92f5a8d4 95if (Threads_FOUND)
f67539c2 96
92f5a8d4 97 boost_test(TYPE run SOURCES histogram_threaded_test.cpp
f67539c2 98 LINK_LIBRARIES Threads::Threads)
92f5a8d4 99 boost_test(TYPE run SOURCES storage_adaptor_threaded_test.cpp
f67539c2
TL
100 LINK_LIBRARIES Threads::Threads)
101
92f5a8d4
TL
102endif()
103
104## No cmake support yet
105# boost_test(TYPE link SOURCES odr_main_test.cpp odr_test.cpp
f67539c2 106# LINK_LIBRARIES Boost::serialization)
92f5a8d4 107# boost_test(TYPE run SOURCES boost_accumulators_support_test.cpp
f67539c2 108# LINK_LIBRARIES Boost::accumulators)
92f5a8d4 109# boost_test(TYPE run SOURCES boost_range_support_test.cpp
f67539c2 110# LINK_LIBRARIES Boost::range)
92f5a8d4 111# boost_test(TYPE run SOURCES boost_units_support_test.cpp
f67539c2
TL
112# LINK_LIBRARIES Boost::units)
113# boost_test(TYPE run SOURCES detail_array_wrapper_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
114# boost_test(TYPE run SOURCES unlimited_storage_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
115# boost_test(TYPE run SOURCES storage_adaptor_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
116# boost_test(TYPE run SOURCES histogram_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
92f5a8d4 117# boost_test(TYPE run SOURCES axis_variant_serialization_test.cpp
f67539c2 118# LINK_LIBRARIES Boost::serialization)
92f5a8d4 119# boost_test(TYPE run SOURCES accumulators_serialization_test.cpp
f67539c2
TL
120# LINK_LIBRARIES Boost::serialization)
121
20effc67
TL
122# Workaround for gcc-5
123if (NOT(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6))
124
125 boost_test(TYPE run SOURCES deduction_guides_test.cpp
126 COMPILE_FEATURES cxx_std_17
127 )
128 boost_test(TYPE run SOURCES issue_290_test.cpp
129 COMPILE_FEATURES cxx_std_17
130 )
131
132endif()