Changeset View
Changeset View
Standalone View
Standalone View
src/test/CMakeLists.txt
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | add_test_to_suite(bitcoin test_bitcoin | ||||
# Tests generated from JSON | # Tests generated from JSON | ||||
${JSON_HEADERS} | ${JSON_HEADERS} | ||||
) | ) | ||||
find_package(Boost 1.58 REQUIRED unit_test_framework) | find_package(Boost 1.58 REQUIRED unit_test_framework) | ||||
target_link_libraries(test_bitcoin Boost::unit_test_framework rpcclient server) | target_link_libraries(test_bitcoin Boost::unit_test_framework rpcclient server) | ||||
if(TARGET bitcoinconsensus-shared) | |||||
target_link_libraries(test_bitcoin bitcoinconsensus-shared) | |||||
else() | |||||
target_link_libraries(test_bitcoin bitcoinconsensus) | |||||
endif() | |||||
# We need to detect if the BOOST_TEST_DYN_LINK flag is required. | # We need to detect if the BOOST_TEST_DYN_LINK flag is required. | ||||
set(CMAKE_REQUIRED_LIBRARIES Boost::unit_test_framework) | set(CMAKE_REQUIRED_LIBRARIES Boost::unit_test_framework) | ||||
check_cxx_source_compiles(" | check_cxx_source_compiles(" | ||||
#define BOOST_TEST_DYN_LINK | #define BOOST_TEST_DYN_LINK | ||||
#define BOOST_TEST_MAIN | #define BOOST_TEST_MAIN | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
" BOOST_TEST_DYN_LINK) | " BOOST_TEST_DYN_LINK) | ||||
Show All 16 Lines |