We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24c4273 commit cf2dc12Copy full SHA for cf2dc12
1 file changed
CMakeLists.txt
@@ -83,7 +83,10 @@ if(MSVC)
83
# C4702: unreachable code
84
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4702")
85
else()
86
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wformat -pedantic -Wvla")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wformat=2 -pedantic -Wvla")
87
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
88
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-signedness")
89
+ endif()
90
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -Werror -fno-omit-frame-pointer")
91
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O2 -fno-omit-frame-pointer -DNDEBUG")
92
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -DNDEBUG")
0 commit comments