]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/rational/test/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / rational / test / CMakeLists.txt
index d6bd0299a4bacb4135d7690a5de10ffe68b61f0c..b66abaf922df4c270959c44fd36eb92ae9415fcd 100644 (file)
@@ -1,25 +1,29 @@
-# Copyright 2019 Mike Dev
+# Copyright 2021 Peter Dimov
 # Distributed under the Boost Software License, Version 1.0.
-# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
-#
-# NOTE: CMake support for Boost.Rational is currently experimental at best
-#       and the interface is likely to change in the future
+# https://www.boost.org/LICENSE_1_0.txt
 
-# NOTE: Boost::test not yet available, so we can't run the regular test
-# add_executable( test_boost_rational_test rational_test.cpp )
-# target_link_libraries( test_boost_rational_test
-#     PUBLIC
-#         Boost::rational
-#         Boost::mpl
-#         Boost::test
-# )
-# add_test( NAME test_boost_rational_test COMMAND test_boost_rational_test )
+include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
 
-add_executable( test_boost_rational_constexpr_test constexpr_test.cpp )
-target_link_libraries( test_boost_rational_constexpr_test
-    PUBLIC
-        Boost::rational
-)
+if(NOT HAVE_BOOST_TEST)
+  return()
+endif()
 
-add_test( NAME test_boost_rational_constexpr_test COMMAND test_boost_rational_constexpr_test )
+set(BOOST_TEST_LINK_LIBRARIES Boost::rational)
 
+boost_test(TYPE run SOURCES rational_example.cpp)
+boost_test(TYPE run SOURCES rational_test.cpp LINK_LIBRARIES Boost::unit_test_framework)
+boost_test(TYPE run SOURCES constexpr_test.cpp COMPILE_FEATURES cxx_constexpr)
+
+boost_test(TYPE compile-fail SOURCES expected_fail_01.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_02.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_03.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_04.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_05.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_06.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_07.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_08.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_09.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_10.cpp)
+boost_test(TYPE compile-fail SOURCES expected_fail_11.cpp)
+
+boost_test(TYPE compile SOURCES expected_compile_12.cpp)