summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMichael Hirsch <scivision@users.noreply.gitlab.kitware.com>2022-11-07 00:03:32 (GMT)
committerMichael Hirsch <scivision@users.noreply.gitlab.kitware.com>2022-11-07 00:06:31 (GMT)
commit81990208240e59ae5b97a735366f7a817e00bb60 (patch)
tree3d5b636fac8a15f74762c738ca8de7432a178b5a /CMakeLists.txt
parent890d44792307134b41274b52cd972e4944af7d36 (diff)
downloadCMake-81990208240e59ae5b97a735366f7a817e00bb60.zip
CMake-81990208240e59ae5b97a735366f7a817e00bb60.tar.gz
CMake-81990208240e59ae5b97a735366f7a817e00bb60.tar.bz2
own CMakeLists: remove unreachable code
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 7 insertions, 13 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()