diff --git a/CMakeLists.txt b/CMakeLists.txt index cb3f28504..6d14b0241 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. +# As of October 2024, we picked 3.9 as our version because internally we still support RHEL5 and AL2012, and CMake 3.9 +# was the latest version available on those platforms. cmake_minimum_required(VERSION 3.9) option(ALLOW_CROSS_COMPILED_TESTS "Allow tests to be compiled via cross compile, for use with qemu" OFF) diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake index 4b73db013..18ebb712c 100644 --- a/cmake/AwsCFlags.cmake +++ b/cmake/AwsCFlags.cmake @@ -230,17 +230,13 @@ function(aws_set_common_properties target) set(_ENABLE_LTO_EXPR $>) # try to check whether compiler supports LTO/IPO - if (POLICY CMP0069) - include(CheckIPOSupported OPTIONAL RESULT_VARIABLE ipo_check_exists) - if (ipo_check_exists) - check_ipo_supported(RESULT ipo_supported) - if (ipo_supported) - message(STATUS "Enabling IPO/LTO for Release builds") - else() - message(STATUS "AWS_ENABLE_LTO is enabled, but cmake/compiler does not support it, disabling") - set(_ENABLE_LTO_EXPR OFF) - endif() - endif() + include(CheckIPOSupported) + check_ipo_supported(RESULT ipo_supported) + if (ipo_supported) + message(STATUS "Enabling IPO/LTO for Release builds") + else() + message(STATUS "AWS_ENABLE_LTO is enabled, but cmake/compiler does not support it, disabling") + set(_ENABLE_LTO_EXPR OFF) endif() else() set(_ENABLE_LTO_EXPR OFF)