diff --git a/crt/aws-crt-cpp/CMakeLists.txt b/crt/aws-crt-cpp/CMakeLists.txt index ec6d17202..5f241aeaf 100644 --- a/crt/aws-crt-cpp/CMakeLists.txt +++ b/crt/aws-crt-cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) if(POLICY CMP0077) cmake_policy(SET CMP0077 NEW) diff --git a/crt/aws-crt-cpp/crt/aws-c-auth/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-auth/CMakeLists.txt index 9f43c2891..69af7daa1 100644 --- a/crt/aws-crt-cpp/crt/aws-c-auth/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-auth/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(aws-c-auth C) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt index d3802e0a2..d80a8cb7f 100644 --- a/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...${CMAKE_VERSION}) project(aws-c-cal LANGUAGES C VERSION 0.1.0) diff --git a/crt/aws-crt-cpp/crt/aws-c-common/AWSCRTAndroidTestRunner/app/src/main/cpp/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-common/AWSCRTAndroidTestRunner/app/src/main/cpp/CMakeLists.txt index a5e57e30d..1085bd1cf 100644 --- a/crt/aws-crt-cpp/crt/aws-c-common/AWSCRTAndroidTestRunner/app/src/main/cpp/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-common/AWSCRTAndroidTestRunner/app/src/main/cpp/CMakeLists.txt @@ -3,7 +3,7 @@ # Sets the minimum version of CMake required to build the native library. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.4.1...${CMAKE_VERSION}) # AWS lib set(path_to_common "${CMAKE_CURRENT_LIST_DIR}/../../../../..") diff --git a/crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt index 6d6e615a3..f68ac27b9 100644 --- a/crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...${CMAKE_VERSION}) option(ALLOW_CROSS_COMPILED_TESTS "Allow tests to be compiled via cross compile, for use with qemu" OFF) project(aws-c-common LANGUAGES C VERSION 0.1.0) diff --git a/crt/aws-crt-cpp/crt/aws-c-compression/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-compression/CMakeLists.txt index e70e013ca..32ca6b2c1 100644 --- a/crt/aws-crt-cpp/crt/aws-c-compression/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-compression/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(aws-c-compression C) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-c-event-stream/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-event-stream/CMakeLists.txt index daf434c19..ec8f235ff 100644 --- a/crt/aws-crt-cpp/crt/aws-c-event-stream/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-event-stream/CMakeLists.txt @@ -1,6 +1,6 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. -cmake_minimum_required (VERSION 3.1) +cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) project (aws-c-event-stream C) if (DEFINED CMAKE_PREFIX_PATH) diff --git a/crt/aws-crt-cpp/crt/aws-c-http/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-http/CMakeLists.txt index cedc6ae98..748887335 100644 --- a/crt/aws-crt-cpp/crt/aws-c-http/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-http/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(aws-c-http C) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-c-io/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-io/CMakeLists.txt index 3f763bec2..f7a73f75f 100644 --- a/crt/aws-crt-cpp/crt/aws-c-io/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-io/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(aws-c-io C) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-c-mqtt/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-mqtt/CMakeLists.txt index b33f24d62..cb3c62022 100644 --- a/crt/aws-crt-cpp/crt/aws-c-mqtt/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-mqtt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(aws-c-mqtt C) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-c-s3/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-s3/CMakeLists.txt index b31b3c4fb..7e401f4bc 100644 --- a/crt/aws-crt-cpp/crt/aws-c-s3/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-s3/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(aws-c-s3 C) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-c-sdkutils/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-c-sdkutils/CMakeLists.txt index 81686c2c7..79321f0d6 100644 --- a/crt/aws-crt-cpp/crt/aws-c-sdkutils/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-c-sdkutils/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...${CMAKE_VERSION}) project(aws-c-sdkutils LANGUAGES C VERSION 0.1.0) if (POLICY CMP0069) diff --git a/crt/aws-crt-cpp/crt/aws-checksums/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-checksums/CMakeLists.txt index a21bc36b8..6db2def3e 100644 --- a/crt/aws-crt-cpp/crt/aws-checksums/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-checksums/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1) +cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) option(STATIC_CRT "Windows specific option that to specify static/dynamic run-time library" OFF) diff --git a/crt/aws-crt-cpp/crt/aws-lc/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-lc/CMakeLists.txt index 5d5e86852..26564f0fe 100644 --- a/crt/aws-crt-cpp/crt/aws-lc/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-lc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...${CMAKE_VERSION}) # Defer enabling C and CXX languages. project(AWSLC NONE) diff --git a/crt/aws-crt-cpp/crt/aws-lc/tests/ci/android/AWSLCAndroidTestRunner/app/src/main/cpp/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-lc/tests/ci/android/AWSLCAndroidTestRunner/app/src/main/cpp/CMakeLists.txt index 7ee1ed851..a45a27f2d 100644 --- a/crt/aws-crt-cpp/crt/aws-lc/tests/ci/android/AWSLCAndroidTestRunner/app/src/main/cpp/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-lc/tests/ci/android/AWSLCAndroidTestRunner/app/src/main/cpp/CMakeLists.txt @@ -3,7 +3,7 @@ # Sets the minimum version of CMake required to build the native library. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.4.1...${CMAKE_VERSION}) # AWS lib set(path_to_awslc "${CMAKE_CURRENT_LIST_DIR}/../../../../../../../../") diff --git a/crt/aws-crt-cpp/crt/aws-lc/tests/ci/run_install_shared_and_static.sh b/crt/aws-crt-cpp/crt/aws-lc/tests/ci/run_install_shared_and_static.sh index 173f531f2..4bf4c23f7 100755 --- a/crt/aws-crt-cpp/crt/aws-lc/tests/ci/run_install_shared_and_static.sh +++ b/crt/aws-crt-cpp/crt/aws-lc/tests/ci/run_install_shared_and_static.sh @@ -76,7 +76,7 @@ int main() { EOF cat < ${MYAPP_SRC_DIR}/CMakeLists.txt -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.0...${CMAKE_VERSION}) project (myapp C) add_library(mylib mylib.c) find_package(ssl REQUIRED) diff --git a/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/CMakeLists.txt index 1379afb92..5ad09ff43 100644 --- a/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/CMakeLists.txt @@ -53,7 +53,7 @@ else() cmake_policy(SET CMP0048 NEW) project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif() -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12...${CMAKE_VERSION}) if (POLICY CMP0063) # Visibility cmake_policy(SET CMP0063 NEW) diff --git a/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/README.md b/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/README.md index d3d805553..f1a190d22 100644 --- a/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/README.md +++ b/crt/aws-crt-cpp/crt/aws-lc/third_party/googletest/README.md @@ -93,7 +93,7 @@ pulled into the main build with `add_subdirectory()`. For example: New file `CMakeLists.txt.in`: ```cmake -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12...${CMAKE_VERSION}) project(googletest-download NONE) diff --git a/crt/aws-crt-cpp/crt/aws-lc/util/ar/testdata/sample/CMakeLists.txt b/crt/aws-crt-cpp/crt/aws-lc/util/ar/testdata/sample/CMakeLists.txt index 9ea2fe8ee..e459030cd 100644 --- a/crt/aws-crt-cpp/crt/aws-lc/util/ar/testdata/sample/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/aws-lc/util/ar/testdata/sample/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0...${CMAKE_VERSION}) project(Sample) add_library(sample STATIC foo.c bar.cc) diff --git a/crt/aws-crt-cpp/crt/s2n/CMakeLists.txt b/crt/aws-crt-cpp/crt/s2n/CMakeLists.txt index 5713558d3..db55f88d8 100644 --- a/crt/aws-crt-cpp/crt/s2n/CMakeLists.txt +++ b/crt/aws-crt-cpp/crt/s2n/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.0...${CMAKE_VERSION}) project (s2n C) if(POLICY CMP0077) diff --git a/crt/aws-crt-cpp/crt/s2n/codebuild/bin/test_install_shared_and_static.sh b/crt/aws-crt-cpp/crt/s2n/codebuild/bin/test_install_shared_and_static.sh index b506185e6..e913eaa1e 100755 --- a/crt/aws-crt-cpp/crt/s2n/codebuild/bin/test_install_shared_and_static.sh +++ b/crt/aws-crt-cpp/crt/s2n/codebuild/bin/test_install_shared_and_static.sh @@ -77,7 +77,7 @@ int main() { EOF cat < $WORK_DIR/myapp-src/CMakeLists.txt -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.0...${CMAKE_VERSION}) project (myapp C) add_library(mylib mylib.c) diff --git a/tests/aws-cpp-sdk-custom-service-integration-tests/CMakeLists.txt b/tests/aws-cpp-sdk-custom-service-integration-tests/CMakeLists.txt index dcde817ee..1903a49db 100644 --- a/tests/aws-cpp-sdk-custom-service-integration-tests/CMakeLists.txt +++ b/tests/aws-cpp-sdk-custom-service-integration-tests/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0. # -cmake_minimum_required (VERSION 3.1) +cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) option(STANDALONE "If enabled, the integration tests will be configured for a standalone custom client." ON) if(STANDALONE) diff --git a/tools/android-build/CMakeLists.txt b/tools/android-build/CMakeLists.txt index dedf79cec..a3ebfca8f 100644 --- a/tools/android-build/CMakeLists.txt +++ b/tools/android-build/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0. # -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION}) project(DEPS) diff --git a/tools/android-build/cmakefiles/openssl-cmake/CMakeLists.txt b/tools/android-build/cmakefiles/openssl-cmake/CMakeLists.txt index 8257f4fc8..92a94242a 100644 --- a/tools/android-build/cmakefiles/openssl-cmake/CMakeLists.txt +++ b/tools/android-build/cmakefiles/openssl-cmake/CMakeLists.txt @@ -31,7 +31,7 @@ set( CMAKE_LEGACY_CYGWIN_WIN32 0 ) project( openssl ) -cmake_minimum_required( VERSION 3.1.0 ) +cmake_minimum_required( VERSION 3.1.0...${CMAKE_VERSION}) set( CMAKE_DISABLE_SOURCE_CHANGES ON ) set( CMAKE_DISABLE_IN_SOURCE_BUILD ON )