From a0c29202befa73137f6b74f3b60860bb9171ac15 Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Thu, 2 Mar 2023 21:12:35 +0800 Subject: [PATCH 1/4] Add build options to fix issues with clang 15. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/CMakeLists.txt | 66 ++++++++++++++++++++++++++++++++++++- contrib/zlib/CMakeLists.txt | 10 +++++- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index a098f3e85..d8e03bca4 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1188,7 +1188,71 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) IF (ASSIMP_WARNINGS_AS_ERRORS) MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)") IF (MSVC) - TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX) + + 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) + ENDIF() ELSE() TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror) ENDIF() diff --git a/contrib/zlib/CMakeLists.txt b/contrib/zlib/CMakeLists.txt index 469151ff6..5bc2d6065 100644 --- a/contrib/zlib/CMakeLists.txt +++ b/contrib/zlib/CMakeLists.txt @@ -76,7 +76,15 @@ if(MSVC) set(CMAKE_DEBUG_POSTFIX "d") add_definitions(-D_CRT_SECURE_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}) +else() + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-non-prototype") + endif() endif() if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) @@ -88,7 +96,7 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) message(STATUS "to 'zconf.h.included' because this file is included with zlib") message(STATUS "but CMake generates it automatically in the build directory.") file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included) - endif() + endif() endif() set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc) From d8201bdb6f43ca396b5cdcacfbda67870397554b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 25 Mar 2023 16:00:29 +0100 Subject: [PATCH 2/4] Update Readme.md --- Readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Readme.md b/Readme.md index 1af71fad8..c8fe3f43f 100644 --- a/Readme.md +++ b/Readme.md @@ -22,6 +22,9 @@ Additionally, assimp features various __mesh post processing tools__: normals an ### Latest Doc's ### Please check the latest documents at [Asset-Importer-Lib-Doc](https://assimp-docs.readthedocs.io/en/latest/). +### Prebuild binaries ### +Please check our [Itchi Projectspace](https://kimkulling.itch.io/the-asset-importer-lib) + ### Get involved ### This is the development repo containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [Github Assimp Releases](https://github.com/assimp/assimp/releases).
From 6d65e9c393e99cc703dc61f6b2d75e5f359d9910 Mon Sep 17 00:00:00 2001 From: Sven Liedtke Date: Thu, 30 Mar 2023 09:21:30 +0200 Subject: [PATCH 3/4] Fix link issue in UWP builds without functional replacement --- contrib/unzip/crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/unzip/crypt.c b/contrib/unzip/crypt.c index 4cc731b3e..cc6650630 100644 --- a/contrib/unzip/crypt.c +++ b/contrib/unzip/crypt.c @@ -103,7 +103,7 @@ int cryptrand(unsigned char *buf, unsigned int len) unsigned __int64 pentium_tsc[1]; int result = 0; - + #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { result = CryptGenRandom(provider, len, buf); @@ -111,6 +111,7 @@ int cryptrand(unsigned char *buf, unsigned int len) if (result) return len; } + #endif for (rlen = 0; rlen < (int)len; ++rlen) { From dacaebc0788848157ad6c54e1f10aa0e117fcefb Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 1 Apr 2023 23:49:22 +0800 Subject: [PATCH 4/4] Remove unused -Wno-shadow-field-in-constructor. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index fd3b1cb88..e05b4dd7b 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1229,7 +1229,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS) -Wno-double-promotion -Wno-unused-macros -Wno-disabled-macro-expansion - -Wno-shadow-field-in-constructor -Wno-shadow-field -Wno-shadow -Wno-language-extension-token