mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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.
This commit is contained in:
@ -54,16 +54,11 @@ endif()
|
|||||||
|
|
||||||
if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR
|
if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR
|
||||||
CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wwrite-strings -std=c99 -pedantic -Werror")
|
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 "GNU"))
|
|
||||||
# -Wmissing-declarations is spelled differently in Clang.
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(STRICT AND (CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
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()
|
endif()
|
||||||
|
|
||||||
add_compile_definitions(HELP_DIR="${CMAKE_INSTALL_PREFIX}/share/sgt-puzzles/help")
|
add_compile_definitions(HELP_DIR="${CMAKE_INSTALL_PREFIX}/share/sgt-puzzles/help")
|
||||||
|
Reference in New Issue
Block a user