Erki a88a57e2ec
All checks were successful
continuous-integration/drone/push Build is passing
Function call tests
2021-03-07 18:37:13 +02:00

32 lines
831 B
CMake

cmake_minimum_required(VERSION 3.14)
find_package(Catch2 REQUIRED)
# LLVM is typically compiled without RTTI. Weird linker errors ensue if
# you keep RTTI on and try to link.
if (NOT LLVM_ENABLE_RTTI)
if (MSVC)
string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
else ()
string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif ()
endif ()
add_executable(op-finder-tests
main.cpp
fixtures/RunOnCodeFixture.cpp
basic_operations.cpp
branches.cpp
function_calls.cpp)
target_link_libraries(op-finder-tests
PUBLIC
op-finder-lib
Catch2::Catch2)
include(CTest)
include(Catch)
catch_discover_tests(op-finder-tests)