diff options
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | CompileFlags.cmake | 5 |
2 files changed, 7 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 73c2c2e..a61113a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,11 +69,7 @@ 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() - if(NOT CMAKE_VERSION VERSION_LESS 3.8) - include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx17_check.cmake) - else() - set(CMake_CXX17_BROKEN 1) - endif() + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx17_check.cmake) if(NOT CMake_CXX17_BROKEN) set(CMAKE_CXX_STANDARD 17) else() @@ -126,14 +122,12 @@ option(CMake_BUILD_DEVELOPER_REFERENCE mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE) # option to build using interprocedural optimizations (IPO/LTO) -if(NOT CMAKE_VERSION VERSION_LESS 3.12.2) - option(CMake_BUILD_LTO "Compile CMake with link-time optimization if supported" OFF) - if(CMake_BUILD_LTO) - include(CheckIPOSupported) - check_ipo_supported(RESULT HAVE_IPO) - if(HAVE_IPO) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - endif() +option(CMake_BUILD_LTO "Compile CMake with link-time optimization if supported" OFF) +if(CMake_BUILD_LTO) + include(CheckIPOSupported) + check_ipo_supported(RESULT HAVE_IPO) + if(HAVE_IPO) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) endif() endif() diff --git a/CompileFlags.cmake b/CompileFlags.cmake index bf8a082..6331af1 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -87,11 +87,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD EQUAL 98) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03") - elseif(CMAKE_VERSION VERSION_LESS 3.8.20170502) - # CMake knows how to add this flag for compilation as C++11, - # but has not been taught that SunPro needs it for linking too. - # Add it in a place that will be used for both. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4") |