Merged `ASSIMP_WARNINGS_AS_ERRORS` and `ASSIMP_WARNINGS_MAX`

And set it ON by default.
pull/4509/head
hgdagon 2022-05-03 12:23:33 -07:00 committed by GitHub
parent bf32c4c408
commit 209c302f56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 18 deletions

View File

@ -112,10 +112,6 @@ OPTION ( ASSIMP_WARNINGS_AS_ERRORS
"Treat all warnings as errors." "Treat all warnings as errors."
OFF OFF
) )
OPTION ( ASSIMP_WARNINGS_MAX
"Enable all warnings."
OFF
)
OPTION ( ASSIMP_ASAN OPTION ( ASSIMP_ASAN
"Enable AddressSanitizer." "Enable AddressSanitizer."
OFF OFF
@ -330,22 +326,12 @@ ENDIF()
IF (ASSIMP_WARNINGS_AS_ERRORS) IF (ASSIMP_WARNINGS_AS_ERRORS)
MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)") MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
set(ASSIMP_WARNINGS_MAX ON)
IF (MSVC) IF (MSVC)
TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
# ADD_COMPILE_OPTIONS(/WX) # ADD_COMPILE_OPTIONS(/W4 /WX)
ELSE() ELSE()
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
# ADD_COMPILE_OPTIONS(-Werror) # ADD_COMPILE_OPTIONS(-Wall -Werror)
ENDIF()
ENDIF()
IF (ASSIMP_WARNINGS_MAX)
MESSAGE(STATUS "Turning on all warnings")
IF (MSVC)
ADD_COMPILE_OPTIONS(/W4) # NB: there is a /Wall option, pedantic mode
ELSE()
ADD_COMPILE_OPTIONS(-Wall)
ENDIF() ENDIF()
ENDIF() ENDIF()