From aaea564cbe37b47059272a103d8581b7a71b455e Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 7 Aug 2020 16:14:44 +0200 Subject: [PATCH 1/4] closes https://github.com/assimp/assimp/issues/3004 : use prefix when ms_tools were found. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0244a73ef..42161c6d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -684,7 +684,8 @@ if(WIN32) ENDIF() IF(MSVC_TOOLSET_VERSION) - set(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}") + SET(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}") + SET(ASSIMP_MSVC_VERSION ${MCVS_PREFIX}) ELSE() IF(MSVC12) SET(ASSIMP_MSVC_VERSION "vc120") From 29b72fe6d47daac902d084c9b7d3be4e75295de0 Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 7 Aug 2020 16:22:34 +0200 Subject: [PATCH 2/4] fix cmake warning --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42161c6d2..36766c7e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,7 +258,7 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) SET(LIBSTDC++_LIBRARIES -lstdc++) ELSEIF(MSVC) # enable multi-core compilation with MSVC - IF( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) # clang-cl + IF( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) # clang-cl ADD_COMPILE_OPTIONS(/bigobj /W4 /WX ) ELSE() # msvc ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX) @@ -268,7 +268,7 @@ ELSEIF(MSVC) ADD_COMPILE_OPTIONS(/wd4351) ENDIF() SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od") -ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) +ELSEIF ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) IF(NOT ASSIMP_HUNTER_ENABLED) SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) From 30d83d40c168d7ee7d08f3a3f66f623be6b9e0a2 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 7 Aug 2020 19:15:28 +0200 Subject: [PATCH 3/4] fix brackets for template in template --- include/assimp/BaseImporter.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/assimp/BaseImporter.h b/include/assimp/BaseImporter.h index e6ff2e68d..06c337853 100644 --- a/include/assimp/BaseImporter.h +++ b/include/assimp/BaseImporter.h @@ -4,7 +4,6 @@ Open Asset Import Library (assimp) Copyright (c) 2006-2020, assimp team - All rights reserved. Redistribution and use of this software in source and binary forms, @@ -40,7 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ -/** @file Definition of the base class for all importer worker classes. */ +/// @file Definition of the base class for all importer worker classes. + #pragma once #ifndef INCLUDED_AI_BASEIMPORTER_H #define INCLUDED_AI_BASEIMPORTER_H @@ -87,10 +87,6 @@ class IOStream; class ASSIMP_API BaseImporter { friend class Importer; -private: - /* Pushes state into importer for the importer scale */ - virtual void UpdateImporterScale(Importer *pImp); - public: /** Constructor to be privately used by #Importer */ BaseImporter() AI_NO_EXCEPT; @@ -399,7 +395,7 @@ public: // static utilities * @param numOut The output count of elements copied. */ template AI_FORCE_INLINE static void CopyVector( - std::vector> &vec, + std::vector > &vec, T **&out, unsigned int &outLength) { outLength = unsigned(vec.size()); @@ -410,7 +406,11 @@ public: // static utilities } } -protected: +private: + /* Pushes state into importer for the importer scale */ + virtual void UpdateImporterScale(Importer *pImp); + + protected: /// Error description in case there was one. std::string m_ErrorText; /// Currently set progress handler. From fbd9c9651dd04d4a6140402b004e6dde1c82b7e3 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 8 Aug 2020 09:06:41 +0200 Subject: [PATCH 4/4] fix clang detection --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36766c7e5..42161c6d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -258,7 +258,7 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) SET(LIBSTDC++_LIBRARIES -lstdc++) ELSEIF(MSVC) # enable multi-core compilation with MSVC - IF( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) # clang-cl + IF( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) # clang-cl ADD_COMPILE_OPTIONS(/bigobj /W4 /WX ) ELSE() # msvc ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX) @@ -268,7 +268,7 @@ ELSEIF(MSVC) ADD_COMPILE_OPTIONS(/wd4351) ENDIF() SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od") -ELSEIF ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) +ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) IF(NOT ASSIMP_HUNTER_ENABLED) SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_POSITION_INDEPENDENT_CODE ON)