Skip to content

Commit 5ed4129

Browse files
committed
Add testing of the separate dectest repo
1 parent 961ff88 commit 5ed4129

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

test/CMakeLists.txt

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
77

88
if(HAVE_BOOST_TEST)
99

10-
find_package(fmt)
11-
find_package(bson 2.0.2 CONFIG)
12-
if(fmt_FOUND AND bson_FOUND)
13-
message(STATUS "Boost.Decimal: Test with fmtlib and bson")
14-
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::decimal Boost::core Boost::math Boost::multiprecision Boost::charconv Boost::random fmt::fmt bson::bson COMPILE_DEFINITIONS BOOST_DECIMAL_TEST_FMT BOOST_DECIMAL_TEST_BSON)
15-
elseif(fmt_FOUND)
16-
message(STATUS "Boost.Decimal: Test with fmtlib")
17-
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::decimal Boost::core Boost::math Boost::multiprecision Boost::charconv Boost::random fmt::fmt COMPILE_DEFINITIONS BOOST_DECIMAL_TEST_FMT)
10+
if(BUILD_DECTEST_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/decimal-dectest/CMakeLists.txt")
11+
12+
add_subdirectory(decimal-dectest)
13+
1814
else()
19-
message(STATUS "Boost.Decimal: Test without fmtlib and bson")
20-
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::decimal Boost::core Boost::math Boost::multiprecision Boost::charconv Boost::random)
15+
16+
find_package(fmt)
17+
find_package(bson 2.0.2 CONFIG)
18+
if(fmt_FOUND AND bson_FOUND)
19+
message(STATUS "Boost.Decimal: Test with fmtlib and bson")
20+
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::decimal Boost::core Boost::math Boost::multiprecision Boost::charconv Boost::random fmt::fmt bson::bson COMPILE_DEFINITIONS BOOST_DECIMAL_TEST_FMT BOOST_DECIMAL_TEST_BSON)
21+
elseif(fmt_FOUND)
22+
message(STATUS "Boost.Decimal: Test with fmtlib")
23+
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::decimal Boost::core Boost::math Boost::multiprecision Boost::charconv Boost::random fmt::fmt COMPILE_DEFINITIONS BOOST_DECIMAL_TEST_FMT)
24+
else()
25+
message(STATUS "Boost.Decimal: Test without fmtlib and bson")
26+
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::decimal Boost::core Boost::math Boost::multiprecision Boost::charconv Boost::random)
27+
endif()
28+
2129
endif()
2230

2331
endif()

0 commit comments

Comments
 (0)