Skip to content

Commit

Permalink
Link catch-main wtih Catch2::Catch2 (#714)
Browse files Browse the repository at this point in the history
Newer versions of Catch2 require C++14 to compile, a requirement
that won't be propagated to the object library unless we link it
to the IMPORTED Catch2::Catch2 target.
  • Loading branch information
ferdnyc committed Aug 16, 2021
1 parent 4d5bf9b commit d246964
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Expand Up @@ -95,6 +95,7 @@ endif()
# Create object library for test executable main(),
# to avoid recompiling for every test
add_library(catch-main OBJECT catch_main.cpp)
target_link_libraries(catch-main PUBLIC Catch2::Catch2)

foreach(tname ${OPENSHOT_TESTS})
add_executable(openshot-${tname}-test ${tname}.cpp $<TARGET_OBJECTS:catch-main>)
Expand Down

0 comments on commit d246964

Please sign in to comment.