From af42d53c92487badcb396e9594157dcfdb196d68 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 16 Dec 2021 19:41:15 +0100 Subject: [PATCH 1/2] Enable C++17 and C99 - closes https://github.com/assimp/assimp/issues/4257 --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22df03370..b96f915bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,8 +182,10 @@ SET (ASSIMP_SOVERSION 5) SET( ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources" ) if(NOT ASSIMP_HUNTER_ENABLED) - # Enable C++11 support globally - set_property( GLOBAL PROPERTY CXX_STANDARD 11 ) + # Enable C++17 support globally + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_C_STANDARD 99) endif() IF(NOT ASSIMP_IGNORE_GIT_HASH) From 2ffa0c59ebc6622d018474bbb921171d541c99dc Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 16 Dec 2021 19:54:40 +0100 Subject: [PATCH 2/2] Switch to C++11 until gtest gets an update. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b96f915bd..bbc7ee744 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,8 +182,8 @@ SET (ASSIMP_SOVERSION 5) SET( ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources" ) if(NOT ASSIMP_HUNTER_ENABLED) - # Enable C++17 support globally - set(CMAKE_CXX_STANDARD 17) + # Enable C++11 support globally + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD 99) endif()