aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-02-18 07:16:12 +0000
committerSimon Tatham <anakin@pobox.com>2023-02-18 08:55:02 +0000
commit615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c (patch)
treec3d224aac05764e3bc3f5b7c5f8597ff99bcae88 /cmake
parent3a3e491a8bc624eb1c3b34e54ebee8d33942add2 (diff)
downloadpuzzles-615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c.zip
puzzles-615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c.tar.gz
puzzles-615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c.tar.bz2
puzzles-615a337e426c0dc598b0bcdd9aec6bcbc4c50d2c.tar.xz
Add -Wmissing-prototypes to STRICT clang builds.
Ben added -Wmissing-declarations in commit 3a3e491a8bc624e for gcc builds, and observed that clang's option of the same name doesn't do the same job. But clang does _have_ an option to do the same job: it's just spelled differently. Added -Wmissing-prototypes in clang builds, so that those will check the same thing.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/platforms/unix.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake
index 65fa6a3..ca4be72 100644
--- a/cmake/platforms/unix.cmake
+++ b/cmake/platforms/unix.cmake
@@ -58,10 +58,14 @@ if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR
endif()
if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU"))
- # -Wmissing-declarations means completely different things in GCC and Clang.
+ # -Wmissing-declarations is spelled differently in Clang.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations")
endif()
+if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "Clang"))
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes")
+endif()
+
add_compile_definitions(HELP_DIR="${CMAKE_INSTALL_PREFIX}/share/sgt-puzzles/help")
function(get_platform_puzzle_extra_source_files OUTVAR NAME)