diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 945ae8d..e4d2a9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,11 +64,20 @@ if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14) set(CMAKE_CXX_STANDARD 98) else() - include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_check.cmake) - if(NOT CMake_CXX14_BROKEN) - set(CMAKE_CXX_STANDARD 14) + if(NOT CMAKE_VERSION VERSION_LESS 3.8) + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx17_check.cmake) else() - set(CMAKE_CXX_STANDARD 11) + set(CMake_CXX17_BROKEN 1) + endif() + if(NOT CMake_CXX17_BROKEN) + set(CMAKE_CXX_STANDARD 17) + else() + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_check.cmake) + if(NOT CMake_CXX14_BROKEN) + set(CMAKE_CXX_STANDARD 14) + else() + set(CMAKE_CXX_STANDARD 11) + endif() endif() endif() endif() |