aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-02-18 13:52:18 +0000
committerBen Harris <bjh21@bjh21.me.uk>2023-02-18 13:52:18 +0000
commitb107decdaf7a49e3cc4b6f6f37c004cd8e2b5119 (patch)
tree079baa404fa5ec24151fad58ffd68fa3235516f8 /cmake
parentb591bbdb5f1588f34bb07729057101d4f8b6907a (diff)
downloadpuzzles-b107decdaf7a49e3cc4b6f6f37c004cd8e2b5119.zip
puzzles-b107decdaf7a49e3cc4b6f6f37c004cd8e2b5119.tar.gz
puzzles-b107decdaf7a49e3cc4b6f6f37c004cd8e2b5119.tar.bz2
puzzles-b107decdaf7a49e3cc4b6f6f37c004cd8e2b5119.tar.xz
Use -Wmissing-prototypes with GCC as well
-Wmissing-prototypes was what I wanted all along, but somehow I'd mis-read the documentation and thought it wasn't.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/platforms/unix.cmake9
1 files changed, 2 insertions, 7 deletions
diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake
index 4a00b6c..e848c9e 100644
--- a/cmake/platforms/unix.cmake
+++ b/cmake/platforms/unix.cmake
@@ -54,16 +54,11 @@ endif()
if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR
CMAKE_C_COMPILER_ID MATCHES "Clang"))
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wwrite-strings -std=c99 -pedantic -Werror")
-endif()
-
-if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU"))
- # -Wmissing-declarations is spelled differently in Clang.
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wwrite-strings -Wmissing-prototypes -std=c99 -pedantic -Werror")
endif()
if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "Clang"))
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes -Wmissing-variable-declarations")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-variable-declarations")
endif()
add_compile_definitions(HELP_DIR="${CMAKE_INSTALL_PREFIX}/share/sgt-puzzles/help")