mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 05:07:58 +00:00
skip tests if compiler does not support required cxx_std
This commit is contained in:
parent
ed9d6324d1
commit
27a49217ff
@ -2,9 +2,8 @@
|
||||
# Distributed under 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
|
||||
|
||||
# Warning: Boost-CMake support is incomplete; testing works, install target doesn't
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
# We support CMake 3.8, but prefer 3.16 policies and behavior
|
||||
cmake_minimum_required(VERSION 3.8...3.16)
|
||||
|
||||
project(boost_histogram VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
@ -13,10 +12,7 @@ add_library(Boost::histogram ALIAS boost_histogram)
|
||||
|
||||
target_include_directories(boost_histogram INTERFACE include)
|
||||
|
||||
target_compile_features(boost_histogram INTERFACE
|
||||
cxx_alias_templates cxx_variadic_templates cxx_decltype_auto
|
||||
cxx_defaulted_functions cxx_generic_lambdas cxx_range_for
|
||||
cxx_relaxed_constexpr cxx_return_type_deduction)
|
||||
target_compile_features(boost_histogram INTERFACE cxx_std_14)
|
||||
|
||||
target_link_libraries(boost_histogram
|
||||
INTERFACE
|
||||
|
@ -11,66 +11,49 @@ if (PYTHONINTERP_FOUND)
|
||||
add_test(NAME runpy-${PROJECT_NAME}_check_odr_test COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_odr_test.py)
|
||||
endif()
|
||||
|
||||
if(cxx_std_14 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||
|
||||
include(BoostTest)
|
||||
|
||||
# keep in sync with Jamfile, this should be automatized...
|
||||
boost_test(TYPE compile-fail SOURCES axis_category_fail0.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_category_fail1.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_category_fail2.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_integer_fail0.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_integer_fail1.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_integer_fail2.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_integer_fail3.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_integer_fail4.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_regular_fail0.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_regular_fail1.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_variable_fail0.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES axis_variable_fail1.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES make_histogram_fail0.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES make_histogram_fail1.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES histogram_fail0.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES histogram_fail1.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES histogram_fail2.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES histogram_fail3.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE compile-fail SOURCES histogram_fail4.cpp
|
||||
LIBRARIES Boost::histogram
|
||||
)
|
||||
LIBRARIES Boost::histogram)
|
||||
boost_test(TYPE run SOURCES accumulators_test.cpp
|
||||
LIBRARIES Boost::histogram Boost::core)
|
||||
boost_test(TYPE run SOURCES algorithm_project_test.cpp
|
||||
@ -156,17 +139,13 @@ boost_test(TYPE run SOURCES unlimited_storage_test.cpp
|
||||
boost_test(TYPE run SOURCES utility_test.cpp
|
||||
LIBRARIES Boost::histogram Boost::core)
|
||||
|
||||
if (cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||
boost_test(TYPE run SOURCES deduction_guides_test.cpp
|
||||
LIBRARIES Boost::histogram Boost::core)
|
||||
target_compile_features(boost_histogram-deduction_guides_test_cpp PRIVATE cxx_std_17)
|
||||
endif()
|
||||
|
||||
if (Threads_FOUND)
|
||||
|
||||
boost_test(TYPE run SOURCES histogram_threaded_test.cpp
|
||||
LIBRARIES Boost::histogram Boost::core Threads::Threads)
|
||||
boost_test(TYPE run SOURCES storage_adaptor_threaded_test.cpp
|
||||
LIBRARIES Boost::histogram Boost::core Threads::Threads)
|
||||
|
||||
endif()
|
||||
|
||||
## No cmake support yet
|
||||
@ -186,3 +165,13 @@ endif()
|
||||
# LIBRARIES Boost::histogram Boost::core Boost::serialization)
|
||||
# boost_test(TYPE run SOURCES accumulators_serialization_test.cpp
|
||||
# LIBRARIES Boost::histogram Boost::core Boost::serialization)
|
||||
|
||||
endif()
|
||||
|
||||
if(cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||
|
||||
boost_test(TYPE run SOURCES deduction_guides_test.cpp
|
||||
LIBRARIES Boost::histogram Boost::core
|
||||
COMPILE_FEATURES cxx_std_17)
|
||||
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user