1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Win32: Enable /W3 on VS for library sources

/W3 is the default for new VS projects and the library builds cleanly
with it on VS 2010-2019 so let's try to keep it that way.

(cherry picked from commit 6b78419c9a)
This commit is contained in:
Camilla Löwy 2020-10-07 22:50:54 +02:00
parent 0b56adb721
commit e0b3361683

View File

@ -120,12 +120,14 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
COMPILE_FLAGS -Wdeclaration-after-statement) COMPILE_FLAGS -Wdeclaration-after-statement)
endif() endif()
# Enable a reasonable set of warnings
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
# Enable a reasonable set of warnings (no, -Wextra is not reasonable)
target_compile_options(glfw PRIVATE "-Wall") target_compile_options(glfw PRIVATE "-Wall")
elseif (MSVC)
target_compile_options(glfw PRIVATE "/W3")
endif() endif()
if (WIN32) if (WIN32)