diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d269262..8cfc7ba 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -44,8 +44,7 @@ CPMAddPackage( file(GLOB sources CONFIGURE_DEPENDS source/*.cpp) add_executable(GreeterTests ${sources}) target_link_libraries(GreeterTests doctest::doctest Greeter::Greeter) - -set_target_properties(GreeterTests PROPERTIES CXX_STANDARD 17) +target_compile_features(GreeterTests PUBLIC cxx_std_17) # enable compiler warnings if(NOT TEST_INSTALLED_VERSION) @@ -66,7 +65,7 @@ enable_testing() # doctest_discover_tests(GreeterTests) # For other testing frameworks add the tests target instead: -ADD_TEST(GreeterTests GreeterTests) +add_test(NAME GreeterTests COMMAND GreeterTests --success=false) # ---- code coverage ----