1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

cmake: Add support for picky developer flags

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-20 16:03:41 +02:00
parent a9a99fb31f
commit 8855a140cf
2 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,12 @@ if (UNIX)
list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector")
endif()
unset(CMAKE_REQUIRED_FLAGS)
if (PICKY_DEVELOPER)
add_c_compiler_flag("-Werror" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wno-error=deprecated-declarations" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)
endif()
endif()
if (MSVC)