From fb000ea58f1de5f795631318fe8873794c90d19e Mon Sep 17 00:00:00 2001 From: Thomas Beutlich Date: Wed, 24 Jan 2024 13:04:44 +0100 Subject: [PATCH] Warn on sign mismatches for format specifiers --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fdc789..b5fde99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,8 +118,10 @@ target_include_directories(${PACKAGE} if(MSVC) target_compile_options(${PACKAGE} PRIVATE /W4) -else() +elseif(Clang) target_compile_options(${PACKAGE} PRIVATE -Wall -Wextra -pedantic) +else() + target_compile_options(${PACKAGE} PRIVATE -Wall -Wextra -Wformat-signedness -pedantic) endif() if(WIN32 AND NOT CYGWIN)