diff options
| author | Martin Hořeňovský | 2020-02-21 21:15:45 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-26 16:07:26 +0100 |
| commit | 6e270958a216821676998e8f6d8f524900156d4d (patch) | |
| tree | 6f231291f8217648ae2839ec9fa4a5102fa004b4 /examples | |
| parent | 50b2cfa5def3004880de93a9fcafefa84b6928af (diff) | |
| download | catch3-6e270958a216821676998e8f6d8f524900156d4d.tar.gz | |
Add development build option to CMake and enable it on CI
Development build enables warnings and and `Werror` or equivalent.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/CMakeLists.txt | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index ecc14b8f..ac68e664 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -56,17 +56,8 @@ foreach( name ${ALL_EXAMPLE_TARGETS} ) target_link_libraries( ${name} Catch2 ) set_property(TARGET ${name} PROPERTY CXX_STANDARD 14) set_property(TARGET ${name} PROPERTY CXX_EXTENSIONS OFF) - - # Add desired warnings - if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" ) - target_compile_options( ${name} PRIVATE -Wall -Wextra -Wunreachable-code ) - endif() - # Clang specific warning go here - if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) - # Actually keep these - target_compile_options( ${name} PRIVATE -Wweak-vtables -Wexit-time-destructors -Wglobal-constructors -Wmissing-noreturn ) - endif() - if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) - target_compile_options( ${name} PRIVATE /W4 /w44265 /WX ) - endif() endforeach() + + +list(APPEND CATCH_WARNING_TARGETS ${ALL_EXAMPLE_TARGETS}) +set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE) |