Merge branch 'master' into master

pull/3636/head
thomasbiang 2021-02-02 14:48:41 -08:00 committed by GitHub
commit d08acb85e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 34 additions and 15 deletions

View File

@ -38,7 +38,7 @@ SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
CMAKE_MINIMUM_REQUIRED( VERSION 3.0 )
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
# Toggles the use of the hunter package manager
option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF)

View File

@ -557,7 +557,12 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Colla
faceStart += submesh.mNumFaces;
// assign the material index
dstMesh->mMaterialIndex = matIdx;
std::map<std::string, size_t>::const_iterator subMatIt = mMaterialIndexByName.find(submesh.mMaterial);
if (subMatIt != mMaterialIndexByName.end()) {
dstMesh->mMaterialIndex = static_cast<unsigned int>(subMatIt->second);
} else {
dstMesh->mMaterialIndex = matIdx;
}
if (dstMesh->mName.length == 0) {
dstMesh->mName = mid.mMeshOrController;
}

View File

@ -43,7 +43,7 @@
# 3) Add libassimp using the file lists (eliminates duplication of file names between
# source groups and library command)
#
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.10 )
SET( HEADER_PATH ../include/assimp )
if(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)

View File

@ -844,7 +844,8 @@ void ValidateDSProcess::Validate(const aiAnimation *pAnimation,
Validate(&pMeshMorphAnim->mName);
if (!pMeshMorphAnim->mNumKeys) {
ReportError("Empty mesh morph animation channel");
ReportWarning("Empty mesh morph animation channel");
return;
}
// otherwise check whether one of the keys exceeds the total duration of the animation

View File

@ -45,7 +45,7 @@ endif()
# ${gtest_BINARY_DIR}.
# Language "C" is required for find_package(Threads).
project(gtest CXX C)
cmake_minimum_required(VERSION 2.6.2)
cmake_minimum_required(VERSION 3.10)
if (COMMAND set_up_hermetic_build)
set_up_hermetic_build()

View File

@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
PROJECT( OpenDDL-Parser )
SET ( OPENDDL_PARSER_VERSION_MAJOR 0 )
SET ( OPENDDL_PARSER_VERSION_MINOR 1 )

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.10)
project(pugixml)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.10)
project(zip
LANGUAGES C

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.10)
# test
set(test_out test.out)

View File

@ -350,6 +350,10 @@ struct aiMetadata {
} else if (nullptr != mValues[index].mData && AI_AIMETADATA == mValues[index].mType) {
*static_cast<T *>(mValues[index].mData) = value;
} else {
if (nullptr != mValues[index].mData) {
delete mValues[index].mData;
mValues[index].mData = nullptr;
}
mValues[index].mData = new T(value);
}

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.10)
include_directories(./)
include_directories(./../../)

View File

@ -36,7 +36,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#----------------------------------------------------------------------
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.10 )
INCLUDE_DIRECTORIES(
${Assimp_SOURCE_DIR}/test/unit

View File

@ -51,11 +51,11 @@ class utMetadata: public ::testing::Test {
protected:
aiMetadata *m_data;
virtual void SetUp() {
void SetUp() override {
m_data = nullptr;
}
virtual void TearDown() {
void TearDown() override {
aiMetadata::Dealloc( m_data );
}
@ -261,3 +261,12 @@ TEST_F( utMetadata, copy_test ) {
EXPECT_EQ( metaVal, v );
}
}
TEST_F( utMetadata, set_test ) {
aiMetadata v;
const std::string key_bool = "test_bool";
v.Set(1, key_bool, true);
v.Set(1, key_bool, true);
v.Set(1, key_bool, true);
v.Set(1, key_bool, true);
}

View File

@ -37,7 +37,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#----------------------------------------------------------------------
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.10 )
INCLUDE_DIRECTORIES(
${Assimp_SOURCE_DIR}/include

View File

@ -37,7 +37,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#----------------------------------------------------------------------
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.10 )
FIND_PACKAGE(DirectX REQUIRED)