diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-02-16 21:31:47 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-02-18 00:13:15 +0000 |
| commit | 3a3e491a8bc624eb1c3b34e54ebee8d33942add2 (patch) | |
| tree | da0ffb32a24d3b8fc975ea495f73d3bdf93785aa /cmake | |
| parent | 0186d78da9e83103eb80b3814d4de8031f29232f (diff) | |
| download | puzzles-3a3e491a8bc624eb1c3b34e54ebee8d33942add2.zip puzzles-3a3e491a8bc624eb1c3b34e54ebee8d33942add2.tar.gz puzzles-3a3e491a8bc624eb1c3b34e54ebee8d33942add2.tar.bz2 puzzles-3a3e491a8bc624eb1c3b34e54ebee8d33942add2.tar.xz | |
Enable -Wmissing-declarations in STRICT mode on GCC
Clang's -Wmissing-declarations means something quite different, so we
only enable it on GCC. This is slightly silly since Clang's
-Wmissing-declarations is enabled by default, but it makes it clear that
we know they're different.
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/platforms/unix.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake index 344ca99..65fa6a3 100644 --- a/cmake/platforms/unix.cmake +++ b/cmake/platforms/unix.cmake @@ -57,6 +57,11 @@ if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR 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 means completely different things in GCC and Clang. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations") +endif() + add_compile_definitions(HELP_DIR="${CMAKE_INSTALL_PREFIX}/share/sgt-puzzles/help") function(get_platform_puzzle_extra_source_files OUTVAR NAME) |