mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 10:35:10 +00:00
Remove ignored Clang compiler flag
Clang ignores this when C99 is enabled, while GCC does not. Removing
the checks for Clang to hopefully avoid a false sense of security.
(cherry picked from commit 9b140d08d7
)
This commit is contained in:
parent
db66a0f028
commit
0b56adb721
@ -109,18 +109,20 @@ target_include_directories(glfw PRIVATE
|
|||||||
${glfw_INCLUDE_DIRS})
|
${glfw_INCLUDE_DIRS})
|
||||||
target_link_libraries(glfw PRIVATE ${glfw_LIBRARIES})
|
target_link_libraries(glfw PRIVATE ${glfw_LIBRARIES})
|
||||||
|
|
||||||
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
|
# Make GCC warn about declarations that VS 2010 and 2012 won't accept for all
|
||||||
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
|
# source files that VS will build (Clang ignores this because we set -std=c99)
|
||||||
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
|
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
|
||||||
# Make GCC and Clang warn about declarations that VS 2010 and 2012 won't
|
|
||||||
# accept for all source files that VS will build
|
|
||||||
set_source_files_properties(context.c init.c input.c monitor.c vulkan.c
|
set_source_files_properties(context.c init.c input.c monitor.c vulkan.c
|
||||||
window.c win32_init.c win32_joystick.c
|
window.c win32_init.c win32_joystick.c
|
||||||
win32_monitor.c win32_time.c win32_thread.c
|
win32_monitor.c win32_time.c win32_thread.c
|
||||||
win32_window.c wgl_context.c egl_context.c
|
win32_window.c wgl_context.c egl_context.c
|
||||||
osmesa_context.c PROPERTIES
|
osmesa_context.c PROPERTIES
|
||||||
COMPILE_FLAGS -Wdeclaration-after-statement)
|
COMPILE_FLAGS -Wdeclaration-after-statement)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
|
||||||
|
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
|
||||||
|
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
|
||||||
|
|
||||||
# Enable a reasonable set of warnings (no, -Wextra is not reasonable)
|
# Enable a reasonable set of warnings (no, -Wextra is not reasonable)
|
||||||
target_compile_options(glfw PRIVATE "-Wall")
|
target_compile_options(glfw PRIVATE "-Wall")
|
||||||
|
Loading…
Reference in New Issue
Block a user