mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
2feaa47737
This commit does three things.
- Removes explicit dependency from boost version 1.63. This is no longer
necessary since orchestra has moved to compiling boost test directly,
and ships version 1.71 (as of now).
- Switches UnitTests.cmake to using modern cmake package for
Boost::unit_test_framework
- Adds an header copied from revng, to define
boost::throw_exception(std::exception const &E)
This is necessary to compile with -fno-exception and boost
unit_test_framework.
45 lines
1.2 KiB
CMake
45 lines
1.2 KiB
CMake
#
|
|
# This file is distributed under the MIT License. See LICENSE.md for details.
|
|
#
|
|
|
|
cmake_policy(SET CMP0060 NEW)
|
|
|
|
set(SRC "${CMAKE_SOURCE_DIR}/tests/Unit")
|
|
|
|
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
|
|
|
|
#
|
|
# test_reachabilitypass
|
|
#
|
|
|
|
add_executable(test_reachabilitypass "${SRC}/ReachabilityPass.cpp")
|
|
target_include_directories(test_reachabilitypass
|
|
PRIVATE "${CMAKE_SOURCE_DIR}"
|
|
"${Boost_INCLUDE_DIRS}")
|
|
target_compile_definitions(test_reachabilitypass
|
|
PRIVATE "BOOST_TEST_DYN_LINK=1")
|
|
target_link_libraries(test_reachabilitypass
|
|
ReachabilityTest
|
|
revng::revngSupport
|
|
Boost::unit_test_framework
|
|
${LLVM_LIBRARIES})
|
|
add_test(NAME test_reachabilitypass COMMAND test_reachabilitypass)
|
|
|
|
#
|
|
# test_combingpass
|
|
#
|
|
|
|
add_executable(test_combingpass "${SRC}/CombingPass.cpp")
|
|
target_include_directories(test_combingpass
|
|
PRIVATE "${CMAKE_SOURCE_DIR}"
|
|
"${Boost_INCLUDE_DIRS}")
|
|
target_compile_definitions(test_combingpass
|
|
PRIVATE "BOOST_TEST_DYN_LINK=1")
|
|
target_link_libraries(test_combingpass
|
|
RestructureCFGPass
|
|
revng::revngSupport
|
|
revng::revngUnitTestHelpers
|
|
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
|
|
${LLVM_LIBRARIES})
|
|
add_test(NAME test_combingpass COMMAND test_combingpass -- "${SRC}/TestGraphs/")
|