handle common install paths for catch.hpp
This commit is contained in:
parent
bb7deb53cb
commit
ae9beb120a
@ -1,3 +1,10 @@
|
|||||||
|
add_library(Catch INTERFACE)
|
||||||
|
if(EXISTS /usr/include/catch/catch.hpp)
|
||||||
|
target_include_directories(Catch INTERFACE /usr/include/catch)
|
||||||
|
elseif(EXISTS /usr/include/catch2/catch.hpp)
|
||||||
|
target_include_directories(Catch INTERFACE /usr/include/catch2)
|
||||||
|
else()
|
||||||
|
endif()
|
||||||
|
|
||||||
#code coverage
|
#code coverage
|
||||||
add_library(coverage_config INTERFACE)
|
add_library(coverage_config INTERFACE)
|
||||||
@ -12,10 +19,10 @@ add_library(decn_cover decn.c)
|
|||||||
target_link_libraries(decn_cover PUBLIC coverage_config)
|
target_link_libraries(decn_cover PUBLIC coverage_config)
|
||||||
|
|
||||||
add_executable(decn_test decn_test.c ../utils.c)
|
add_executable(decn_test decn_test.c ../utils.c)
|
||||||
target_link_libraries(decn_test decn_cover coverage_config)
|
target_link_libraries(decn_test decn_cover coverage_config Catch)
|
||||||
|
|
||||||
add_executable(decn_tests catch_main.cpp decn_tests.cpp ../utils.c)
|
add_executable(decn_tests catch_main.cpp decn_tests.cpp ../utils.c)
|
||||||
target_link_libraries(decn_tests decn_cover coverage_config mpfr)
|
target_link_libraries(decn_tests decn_cover coverage_config mpfr Catch)
|
||||||
|
|
||||||
# decn prototyping
|
# decn prototyping
|
||||||
add_subdirectory(proto)
|
add_subdirectory(proto)
|
||||||
|
Loading…
Reference in New Issue
Block a user