Merge pull request #4993 from Jackie9527/clang-cl-15.0.1-support
Add build options to fix issues with clang 15.pull/5052/head
commit
7c64b6c599
|
@ -1195,7 +1195,71 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp)
|
||||||
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)")
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
|
|
||||||
|
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
|
||||||
|
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror
|
||||||
|
-Wno-unused-function
|
||||||
|
-Wno-microsoft-enum-value
|
||||||
|
-Wno-switch-enum
|
||||||
|
-Wno-covered-switch-default
|
||||||
|
-Wno-reserved-identifier
|
||||||
|
-Wno-c++98-compat-pedantic
|
||||||
|
-Wno-c++98-compat
|
||||||
|
-Wno-documentation
|
||||||
|
-Wno-documentation-unknown-command
|
||||||
|
-Wno-deprecated-dynamic-exception-spec
|
||||||
|
-Wno-undef
|
||||||
|
-Wno-suggest-destructor-override
|
||||||
|
-Wno-suggest-override
|
||||||
|
-Wno-inconsistent-missing-destructor-override
|
||||||
|
-Wno-zero-as-null-pointer-constant
|
||||||
|
-Wno-global-constructors
|
||||||
|
-Wno-exit-time-destructors
|
||||||
|
-Wno-extra-semi-stmt
|
||||||
|
-Wno-missing-prototypes
|
||||||
|
-Wno-old-style-cast
|
||||||
|
-Wno-cast-align
|
||||||
|
-Wno-cast-qual
|
||||||
|
-Wno-float-equal
|
||||||
|
-Wno-implicit-int-float-conversion
|
||||||
|
-Wno-sign-conversion
|
||||||
|
-Wno-implicit-float-conversion
|
||||||
|
-Wno-implicit-int-conversion
|
||||||
|
-Wno-float-conversion
|
||||||
|
-Wno-double-promotion
|
||||||
|
-Wno-unused-macros
|
||||||
|
-Wno-disabled-macro-expansion
|
||||||
|
-Wno-shadow-field-in-constructor
|
||||||
|
-Wno-shadow-field
|
||||||
|
-Wno-shadow
|
||||||
|
-Wno-language-extension-token
|
||||||
|
-Wno-header-hygiene
|
||||||
|
-Wno-tautological-value-range-compare
|
||||||
|
-Wno-tautological-type-limit-compare
|
||||||
|
-Wno-missing-noreturn
|
||||||
|
-Wno-missing-variable-declarations
|
||||||
|
-Wno-extra-semi
|
||||||
|
-Wno-nonportable-system-include-path
|
||||||
|
-Wno-undefined-reinterpret-cast
|
||||||
|
-Wno-shift-sign-overflow
|
||||||
|
-Wno-deprecated-copy-with-user-provided-dtor
|
||||||
|
-Wno-deprecated-copy-with-dtor
|
||||||
|
-Wno-deprecated
|
||||||
|
-Wno-format-nonliteral
|
||||||
|
-Wno-format-non-iso
|
||||||
|
-Wno-comma
|
||||||
|
-Wno-unreachable-code-break
|
||||||
|
-Wno-unreachable-code-return
|
||||||
|
-Wno-unreachable-code
|
||||||
|
-Wno-implicit-fallthrough
|
||||||
|
-Wno-unused-template
|
||||||
|
-Wno-undefined-func-template
|
||||||
|
-Wno-nested-anon-types
|
||||||
|
-Wno-declaration-after-statement
|
||||||
|
)
|
||||||
|
ELSE()
|
||||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
|
TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
|
||||||
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
|
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -76,7 +76,15 @@ if(MSVC)
|
||||||
set(CMAKE_DEBUG_POSTFIX "d")
|
set(CMAKE_DEBUG_POSTFIX "d")
|
||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-non-prototype")
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
else()
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-non-prototype")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||||
|
|
Loading…
Reference in New Issue