Merge pull request #3571 from JacksonM8/issue_3570

Issue 3570 (CMake Policy violations on MSVC)
pull/3581/head
Kim Kulling 2021-01-09 08:41:28 +01:00 committed by GitHub
commit ec08092dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -261,7 +261,7 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
ENDIF()
ELSEIF(MSVC)
# enable multi-core compilation with MSVC
IF( "${CMAKE_CXX_COMPILER_ID}" MATCHES "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)
@ -271,7 +271,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 MATCHES "Clang" )
IF(NOT ASSIMP_HUNTER_ENABLED)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)

View File

@ -220,7 +220,7 @@ if(ASSIMP_HUNTER_ENABLED)
find_package(GTest CONFIG REQUIRED)
target_link_libraries(unit GTest::gtest_main GTest::gmock)
else()
target_sources(unit PUBLIC ../contrib/gtest/src/gtest-all.cc)
target_sources(unit PUBLIC ${Assimp_SOURCE_DIR}/contrib/gtest/src/gtest-all.cc)
endif()
TARGET_USE_COMMON_OUTPUT_DIRECTORY(unit)