mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Returned basic warnings to CMake generated builds
This commit is contained in:
parent
70d3c937c3
commit
7ae96c710b
@ -238,6 +238,17 @@ include_directories(${HEADER_DIR})
|
|||||||
add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${HEADERS})
|
add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${HEADERS})
|
||||||
add_executable(Benchmark ${BENCH_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
|
# configure unit tests via CTest
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_test(NAME RunTests COMMAND SelfTest)
|
add_test(NAME RunTests COMMAND SelfTest)
|
||||||
|
Loading…
Reference in New Issue
Block a user