Explorar o código

Fix warnings-as-errors flag on MSVC

Turo Lamminen %!s(int64=8) %!d(string=hai) anos
pai
achega
799f0a3ac8
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      CMakeLists.txt

+ 4 - 0
CMakeLists.txt

@@ -219,8 +219,12 @@ if (ASSIMP_COVERALLS)
 endif()
 
 if (ASSIMP_WERROR)
+  IF (MSVC)
+    add_compile_options(/WX)
+  ELSE()
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+  ENDIF()
 endif()
 
 INCLUDE (FindPkgMacros)