1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-09-01 06:30:52 +02:00

why manipulate target properies?

disable ccache be default
but use -Wpendatic instead of -pedeantic
This commit is contained in:
ClausKlein 2021-02-06 23:37:28 +01:00
parent 48ab4e707d
commit 0ec4474d42
4 changed files with 5 additions and 4 deletions

View file

@ -45,7 +45,7 @@ target_compile_features(GreeterTests PUBLIC cxx_std_17)
# enable compiler warnings
if(NOT TEST_INSTALLED_VERSION)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(Greeter PRIVATE -Wall -pedantic -Wextra -Werror)
target_compile_options(Greeter PRIVATE -Wall -Wpedantic -Wextra -Werror)
elseif(MSVC)
target_compile_options(Greeter PRIVATE /W4 /WX)
target_compile_definitions(GreeterTests PRIVATE DOCTEST_CONFIG_USE_STD_HEADERS)