Fixed `ASSIMP_WARNINGS_MAX` reference

pull/4509/head
hgdagon 2022-04-30 08:40:48 -07:00 committed by GitHub
parent 694dc8a0c3
commit bf32c4c408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -150,10 +150,12 @@ IF (WIN32)
# Multibyte character set is deprecated since at least MSVC2015 (possibly earlier)
ADD_DEFINITIONS( -DUNICODE -D_UNICODE )
ENDIF()
# Link statically against c/c++ lib to avoid missing redistriburable such as
# "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users
# a choice to opt for the shared runtime if they want.
option(USE_STATIC_CRT "Link against the static runtime libraries." OFF)
# The CMAKE_CXX_FLAGS vars can be overriden by some Visual Studio generators, so we use an alternative
# global method here:
if (${USE_STATIC_CRT})
@ -328,15 +330,13 @@ ENDIF()
IF (ASSIMP_WARNINGS_AS_ERRORS)
MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
set(ASSIMP_ERROR_MAX ON)
set(ASSIMP_WARNINGS_MAX ON)
IF (MSVC)
# TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX)
# TARGET_COMPILE_OPTIONS(assimp_cmd PRIVATE /WX)
ADD_COMPILE_OPTIONS(/WX)
TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX)
# ADD_COMPILE_OPTIONS(/WX)
ELSE()
# TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)
# TARGET_COMPILE_OPTIONS(assimp_cmd PRIVATE -Werror)
ADD_COMPILE_OPTIONS(-Werror)
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)
# ADD_COMPILE_OPTIONS(-Werror)
ENDIF()
ENDIF()