소스 검색

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.
Camilla Löwy 5 년 전
부모
커밋
6b78419c9a
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/CMakeLists.txt

+ 3 - 1
src/CMakeLists.txt

@@ -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)