Skip to content

Commit

Permalink
Win32: Enable /W3 on VS for library sources
Browse files Browse the repository at this point in the history
/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.
  • Loading branch information
elmindreda committed Nov 11, 2020
1 parent 9b140d0 commit 6b78419
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,14 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
COMPILE_FLAGS -Wdeclaration-after-statement)
endif()

# Enable a reasonable set of warnings
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)
target_compile_options(glfw PRIVATE "-Wall")
elseif (MSVC)
target_compile_options(glfw PRIVATE "/W3")
endif()

if (WIN32)
Expand Down

0 comments on commit 6b78419

Please sign in to comment.