Fix warnings-as-errors flag on MSVC

pull/1469/head
Turo Lamminen 2017-10-02 11:40:57 +03:00
parent c202d43d8f
commit 799f0a3ac8
1 changed files with 4 additions and 0 deletions

View File

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