Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/TestSuite.cmake
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | function(add_boost_unit_tests_to_suite SUITE NAME) | ||||
foreach(_test_source ${ARG_TESTS}) | foreach(_test_source ${ARG_TESTS}) | ||||
target_sources(${NAME} PRIVATE "${_test_source}") | target_sources(${NAME} PRIVATE "${_test_source}") | ||||
get_filename_component(_test_name "${_test_source}" NAME_WE) | get_filename_component(_test_name "${_test_source}" NAME_WE) | ||||
_add_test_runner( | _add_test_runner( | ||||
${SUITE} | ${SUITE} | ||||
${_test_name} | ${_test_name} | ||||
${NAME} -t "${_test_name}" | ${NAME} -t "${_test_name}" | ||||
) | ) | ||||
if(TEST_WITH_UPGRADE_ACTIVATED) | |||||
_add_test_runner( | |||||
${SUITE} | |||||
"${_test_name}-upgrade-activated" | |||||
${NAME} -t "${_test_name}" | |||||
-- -gravitonactivationtime=1573819200 | |||||
) | |||||
endif() | |||||
endforeach() | endforeach() | ||||
find_package(Boost 1.58 REQUIRED unit_test_framework) | find_package(Boost 1.58 REQUIRED unit_test_framework) | ||||
target_link_libraries(${NAME} Boost::unit_test_framework) | target_link_libraries(${NAME} Boost::unit_test_framework) | ||||
# 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 | ||||
include(CheckCXXSourceCompiles) | include(CheckCXXSourceCompiles) | ||||
set(CMAKE_REQUIRED_LIBRARIES Boost::unit_test_framework) | set(CMAKE_REQUIRED_LIBRARIES Boost::unit_test_framework) | ||||
Show All 11 Lines |