Commit f5189553 authored by Eric Niebler's avatar Eric Niebler Committed by Facebook Github Bot

only the tests need to depend on Catch2

fbshipit-source-id: ec5e6c15ed3e61894d297e675f0180008ea6de4a
parent 3696eeae
...@@ -16,15 +16,13 @@ target_include_directories(pushmi INTERFACE ...@@ -16,15 +16,13 @@ target_include_directories(pushmi INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/executors-impl/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/executors-impl/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/futures-impl/future-executor-interaction/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/futures-impl/future-executor-interaction/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/networking-ts-impl/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/networking-ts-impl/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/Catch2/single_include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/nonius/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/external/nonius/include>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/executors> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/executors>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/futures> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/futures>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/net> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/net>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/Catch2> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/nonius>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/nonius>) )
if (PUSHMI_USE_CONCEPTS_EMULATION) if (PUSHMI_USE_CONCEPTS_EMULATION)
...@@ -66,7 +64,6 @@ target_compile_options(pushmi INTERFACE ...@@ -66,7 +64,6 @@ target_compile_options(pushmi INTERFACE
endif(PUSHMI_USE_CONCEPTS_EMULATION) endif(PUSHMI_USE_CONCEPTS_EMULATION)
target_compile_options(pushmi INTERFACE target_compile_options(pushmi INTERFACE
$<$<CXX_COMPILER_ID:GNU>:-ftemplate-backtrace-limit=0>) $<$<CXX_COMPILER_ID:GNU>:-ftemplate-backtrace-limit=0>)
if (PUSHMI_CONCEPTS) if (PUSHMI_CONCEPTS)
......
include(../external/Catch2/contrib/Catch.cmake) add_library(catch STATIC catch.cpp)
target_include_directories(catch PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/Catch2/single_include>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/Catch2>)
add_library(CatchImpl catch.cpp) include(../external/Catch2/contrib/Catch.cmake)
target_link_libraries(CatchImpl pushmi)
add_executable(FlowTest FlowTest.cpp) add_executable(FlowTest FlowTest.cpp)
target_link_libraries(FlowTest pushmi CatchImpl Threads::Threads) target_link_libraries(FlowTest pushmi catch Threads::Threads)
catch_discover_tests(FlowTest) catch_discover_tests(FlowTest)
add_executable(CompileTest CompileTest.cpp) add_executable(CompileTest CompileTest.cpp)
target_link_libraries(CompileTest pushmi CatchImpl Threads::Threads) target_link_libraries(CompileTest pushmi catch Threads::Threads)
# catch_discover_tests(CompileTest) # catch_discover_tests(CompileTest)
add_executable(NewThreadTest NewThreadTest.cpp) add_executable(NewThreadTest NewThreadTest.cpp)
target_link_libraries(NewThreadTest pushmi CatchImpl Threads::Threads) target_link_libraries(NewThreadTest pushmi catch Threads::Threads)
catch_discover_tests(NewThreadTest) catch_discover_tests(NewThreadTest)
add_executable(TrampolineTest TrampolineTest.cpp) add_executable(TrampolineTest TrampolineTest.cpp)
target_link_libraries(TrampolineTest pushmi CatchImpl Threads::Threads) target_link_libraries(TrampolineTest pushmi catch Threads::Threads)
catch_discover_tests(TrampolineTest) catch_discover_tests(TrampolineTest)
add_executable(PushmiTest PushmiTest.cpp) add_executable(PushmiTest PushmiTest.cpp)
target_link_libraries(PushmiTest pushmi CatchImpl Threads::Threads) target_link_libraries(PushmiTest pushmi catch Threads::Threads)
catch_discover_tests(PushmiTest) catch_discover_tests(PushmiTest)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment