catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Returned basic warnings to CMake generated builds
- Commit
7ae96c710b579f8beb58d713e0e93192755bd37d- Author
- Martin Hořeňovský ·
- Parents
70d3c937c31b
Changes
CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e2b23c3..f4ca23c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,6 +238,17 @@ include_directories(${HEADER_DIR}) add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${HEADERS}) add_executable(Benchmark ${BENCH_SOURCES} ${HEADERS}) +# Add desired warnings +if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" ) + target_compile_options( SelfTest PRIVATE -Wall -Wextra ) + target_compile_options( Benchmark PRIVATE -Wall -Wextra ) +endif() +if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) + target_compile_options( SelfTest PRIVATE /W4 ) + target_compile_options( Benchmark PRIVATE /W4 ) +endif() + + # configure unit tests via CTest enable_testing() add_test(NAME RunTests COMMAND SelfTest)