]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/histogram/test/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / histogram / test / CMakeLists.txt
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
5 find_package(PythonInterp)
6 if (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)
9
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)
12 endif()
13
14 include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
15 if(NOT HAVE_BOOST_TEST)
16 return()
17 endif()
18
19 set(BOOST_TEST_LINK_LIBRARIES Boost::histogram)
20
21 # keep in sync with Jamfile, this should be automated...
22 boost_test(TYPE compile-fail SOURCES axis_category_fail0.cpp)
23 boost_test(TYPE compile-fail SOURCES axis_category_fail1.cpp)
24 boost_test(TYPE compile-fail SOURCES axis_category_fail2.cpp)
25 boost_test(TYPE compile-fail SOURCES axis_integer_fail0.cpp)
26 boost_test(TYPE compile-fail SOURCES axis_integer_fail1.cpp)
27 boost_test(TYPE compile-fail SOURCES axis_integer_fail2.cpp)
28 boost_test(TYPE compile-fail SOURCES axis_integer_fail3.cpp)
29 boost_test(TYPE compile-fail SOURCES axis_integer_fail4.cpp)
30 boost_test(TYPE compile-fail SOURCES axis_regular_fail0.cpp)
31 boost_test(TYPE compile-fail SOURCES axis_regular_fail1.cpp)
32 boost_test(TYPE compile-fail SOURCES axis_variable_fail0.cpp)
33 boost_test(TYPE compile-fail SOURCES axis_variable_fail1.cpp)
34 boost_test(TYPE compile-fail SOURCES make_histogram_fail0.cpp)
35 boost_test(TYPE compile-fail SOURCES make_histogram_fail1.cpp)
36 boost_test(TYPE compile-fail SOURCES histogram_fail0.cpp)
37 boost_test(TYPE compile-fail SOURCES histogram_fail1.cpp)
38 boost_test(TYPE compile-fail SOURCES histogram_fail2.cpp)
39 boost_test(TYPE compile-fail SOURCES histogram_fail3.cpp)
40 boost_test(TYPE compile-fail SOURCES histogram_fail4.cpp)
41
42 set(BOOST_TEST_LINK_LIBRARIES Boost::histogram Boost::core)
43
44 boost_test(TYPE run SOURCES accumulators_count_test.cpp)
45 boost_test(TYPE run SOURCES accumulators_mean_test.cpp)
46 boost_test(TYPE run SOURCES accumulators_sum_test.cpp)
47 boost_test(TYPE run SOURCES accumulators_weighted_mean_test.cpp)
48 boost_test(TYPE run SOURCES accumulators_weighted_sum_test.cpp)
49 boost_test(TYPE run SOURCES algorithm_project_test.cpp)
50 boost_test(TYPE run SOURCES algorithm_reduce_test.cpp)
51 boost_test(TYPE run SOURCES algorithm_sum_test.cpp)
52 boost_test(TYPE run SOURCES algorithm_empty_test.cpp)
53 boost_test(TYPE run SOURCES axis_boolean_test.cpp)
54 boost_test(TYPE run SOURCES axis_category_test.cpp)
55 boost_test(TYPE run SOURCES axis_integer_test.cpp)
56 boost_test(TYPE run SOURCES axis_option_test.cpp)
57 boost_test(TYPE run SOURCES axis_regular_test.cpp)
58 boost_test(TYPE run SOURCES axis_traits_test.cpp)
59 boost_test(TYPE run SOURCES axis_variable_test.cpp)
60 boost_test(TYPE run SOURCES axis_variant_test.cpp)
61 boost_test(TYPE run SOURCES detail_accumulator_traits_test.cpp)
62 boost_test(TYPE run SOURCES detail_argument_traits_test.cpp)
63 boost_test(TYPE run SOURCES detail_args_type_test.cpp)
64 boost_test(TYPE run SOURCES detail_axes_test.cpp)
65 boost_test(TYPE run SOURCES detail_convert_integer_test.cpp)
66 boost_test(TYPE run SOURCES detail_detect_test.cpp)
67 boost_test(TYPE run SOURCES detail_limits_test.cpp)
68 boost_test(TYPE run SOURCES detail_make_default_test.cpp)
69 boost_test(TYPE run SOURCES detail_misc_test.cpp)
70 boost_test(TYPE run SOURCES detail_large_int_test.cpp)
71 boost_test(TYPE run SOURCES detail_iterator_adaptor_test.cpp)
72 boost_test(TYPE run SOURCES detail_operators_test.cpp)
73 boost_test(TYPE run SOURCES detail_relaxed_equal_test.cpp)
74 boost_test(TYPE run SOURCES detail_replace_type_test.cpp)
75 boost_test(TYPE run SOURCES detail_safe_comparison_test.cpp)
76 boost_test(TYPE run SOURCES detail_static_if_test.cpp)
77 boost_test(TYPE run SOURCES detail_tuple_slice_test.cpp)
78 boost_test(TYPE run SOURCES histogram_custom_axis_test.cpp)
79 boost_test(TYPE run SOURCES histogram_dynamic_test.cpp)
80 boost_test(TYPE run SOURCES histogram_fill_test.cpp
81 COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
82 boost_test(TYPE run SOURCES histogram_growing_test.cpp)
83 boost_test(TYPE run SOURCES histogram_mixed_test.cpp)
84 boost_test(TYPE run SOURCES histogram_operators_test.cpp
85 COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
86 boost_test(TYPE run SOURCES histogram_ostream_test.cpp)
87 boost_test(TYPE run SOURCES histogram_test.cpp)
88 boost_test(TYPE run SOURCES indexed_test.cpp)
89 boost_test(TYPE run SOURCES storage_adaptor_test.cpp)
90 boost_test(TYPE run SOURCES unlimited_storage_test.cpp)
91 boost_test(TYPE run SOURCES utility_test.cpp)
92 boost_test(TYPE run SOURCES issue_327_test.cpp)
93
94 find_package(Threads)
95 if (Threads_FOUND)
96
97 boost_test(TYPE run SOURCES histogram_threaded_test.cpp
98 LINK_LIBRARIES Threads::Threads)
99 boost_test(TYPE run SOURCES storage_adaptor_threaded_test.cpp
100 LINK_LIBRARIES Threads::Threads)
101 boost_test(TYPE run SOURCES accumulators_count_thread_safe_test.cpp
102 LINK_LIBRARIES Threads::Threads)
103 boost_test(TYPE run SOURCES accumulators_thread_safe_test.cpp
104 LINK_LIBRARIES Threads::Threads)
105
106 endif()
107
108 ## No cmake support yet
109 # boost_test(TYPE link SOURCES odr_main_test.cpp odr_test.cpp
110 # LINK_LIBRARIES Boost::serialization)
111 # boost_test(TYPE run SOURCES boost_accumulators_support_test.cpp
112 # LINK_LIBRARIES Boost::accumulators)
113 # boost_test(TYPE run SOURCES boost_range_support_test.cpp
114 # LINK_LIBRARIES Boost::range)
115 # boost_test(TYPE run SOURCES boost_units_support_test.cpp
116 # LINK_LIBRARIES Boost::units)
117 # boost_test(TYPE run SOURCES detail_array_wrapper_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
118 # boost_test(TYPE run SOURCES unlimited_storage_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
119 # boost_test(TYPE run SOURCES storage_adaptor_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
120 # boost_test(TYPE run SOURCES histogram_serialization_test.cpp LINK_LIBRARIES Boost::serialization)
121 # boost_test(TYPE run SOURCES axis_variant_serialization_test.cpp
122 # LINK_LIBRARIES Boost::serialization)
123 # boost_test(TYPE run SOURCES accumulators_serialization_test.cpp
124 # LINK_LIBRARIES Boost::serialization)
125 # boost_test(TYPE run SOURCES histogram_ostream_ascii_test.cpp)
126
127 # Workaround for gcc-5
128 if (NOT(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6))
129
130 boost_test(TYPE run SOURCES deduction_guides_test.cpp
131 COMPILE_FEATURES cxx_std_17
132 )
133 boost_test(TYPE run SOURCES issue_290_test.cpp
134 COMPILE_FEATURES cxx_std_17
135 )
136
137 endif()