diff options
Diffstat (limited to 'Tests/RunCMake')
312 files changed, 516 insertions, 506 deletions
diff --git a/Tests/RunCMake/AutoExportDll/CMakeLists.txt b/Tests/RunCMake/AutoExportDll/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/AutoExportDll/CMakeLists.txt +++ b/Tests/RunCMake/AutoExportDll/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/BuildDepends/CMakeLists.txt b/Tests/RunCMake/BuildDepends/CMakeLists.txt index 99f238b..8eb5748 100644 --- a/Tests/RunCMake/BuildDepends/CMakeLists.txt +++ b/Tests/RunCMake/BuildDepends/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/BundleUtilities/CMakeLists.txt b/Tests/RunCMake/BundleUtilities/CMakeLists.txt index 6dd8cdf..44025d3 100644 --- a/Tests/RunCMake/BundleUtilities/CMakeLists.txt +++ b/Tests/RunCMake/BundleUtilities/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.12) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake index df28102..a7b05d2 100644 --- a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake +++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.4) include(RunCMake) # TODO Migrate Tests/BundleUtilities here diff --git a/Tests/RunCMake/Byproducts/CleanByproducts.cmake b/Tests/RunCMake/Byproducts/CleanByproducts.cmake index 85d9582..961deb9 100644 --- a/Tests/RunCMake/Byproducts/CleanByproducts.cmake +++ b/Tests/RunCMake/Byproducts/CleanByproducts.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.10) -project(CleanByproducts) +enable_language(C) +enable_language(CXX) # Configurable parameters set(TEST_CLEAN_NO_CUSTOM FALSE CACHE BOOL "Value for the CLEAN_NO_CUSTOM PROPERTY") diff --git a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake index f42d8e4..3d861fb 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake +++ b/Tests/RunCMake/CMP0004/CMP0004-NEW.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.4) - cmake_policy(SET CMP0004 NEW) add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake index 3fa58b6..32c1474 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake +++ b/Tests/RunCMake/CMP0004/CMP0004-OLD.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.4) - cmake_policy(SET CMP0004 OLD) add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt b/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/CMP0004/CMP0004-WARN-stderr.txt +++ /dev/null diff --git a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake index 2970476..b7cd7ff 100644 --- a/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake +++ b/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.4) - cmake_policy(SET CMP0004 NEW) add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0004/CMakeLists.txt b/Tests/RunCMake/CMP0004/CMakeLists.txt index 12cd3c7..93ee9df 100644 --- a/Tests/RunCMake/CMP0004/CMakeLists.txt +++ b/Tests/RunCMake/CMP0004/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt index a446211..dc03414 100644 --- a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt @@ -1,13 +1,6 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0019-OLD\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0019 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt index f7b9c0e..6eee437 100644 --- a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt @@ -1,11 +1,4 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0019 is not set: Do not re-expand variables in include and link information. Run "cmake --help-policy CMP0019" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/CMP0019/RunCMakeTest.cmake b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake index 119fc2b..fcd080f 100644 --- a/Tests/RunCMake/CMP0019/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0019-WARN) run_cmake(CMP0019-OLD) diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt index 87404d3..c84a289 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt @@ -1,11 +1,4 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt index 5d75720..39a9511 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt @@ -1,11 +1,4 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -+ -CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt deleted file mode 100644 index 66a58fb..0000000 --- a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt +++ /dev/null @@ -1,6 +0,0 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions.$ diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake index 4c10996..ea956fc 100644 --- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0022-WARN) run_cmake(CMP0022-WARN-tll) diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake index 047da28..6476176 100644 --- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0026-WARN) run_cmake(CMP0026-OLD) diff --git a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake index 5952279..558fba3 100644 --- a/Tests/RunCMake/CMP0037/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0037/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) if(RunCMake_GENERATOR MATCHES "^Ninja") # Detect ninja version so we know what tests can be supported. diff --git a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake index fc3500a..3e7b5f3 100644 --- a/Tests/RunCMake/CMP0038/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0038/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0038-WARN) run_cmake(CMP0038-NEW) diff --git a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake index 58e8ea9..ce7541a 100644 --- a/Tests/RunCMake/CMP0039/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0039/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0039-WARN) run_cmake(CMP0039-NEW) diff --git a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake index 13160e3..e5e6c37 100644 --- a/Tests/RunCMake/CMP0040/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0040/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0040-OLD-missing-target) run_cmake(CMP0040-NEW-missing-target) diff --git a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake index f47bb2e..93378c2 100644 --- a/Tests/RunCMake/CMP0041/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0041/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) # Protect tests from running inside the default install prefix. set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefaultPrefix") diff --git a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake index 3b226d7..6b23145 100644 --- a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0042-OLD) run_cmake(CMP0042-NEW) diff --git a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake index 7f9572e..b940528 100644 --- a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) diff --git a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake index 7c0e8a2..009d455 100644 --- a/Tests/RunCMake/CMP0045/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0045/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0045-OLD) run_cmake(CMP0045-NEW) diff --git a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake index 0a39c76..86b749a 100644 --- a/Tests/RunCMake/CMP0046/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0046/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0046-OLD-missing-dependency) run_cmake(CMP0046-NEW-missing-dependency) diff --git a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake index a8aa9d9..e71f31e 100644 --- a/Tests/RunCMake/CMP0049/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0049/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0049-OLD) run_cmake(CMP0049-NEW) diff --git a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake index b7de284..526a9aa 100644 --- a/Tests/RunCMake/CMP0050/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0050/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0050-OLD) run_cmake(CMP0050-NEW) diff --git a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake index 621192d..955d898 100644 --- a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0051-OLD) run_cmake(CMP0051-NEW) diff --git a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake index 6521ac0..de58c25 100644 --- a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0053-OLD) run_cmake(CMP0053-NEW) diff --git a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake index 2f2fb76..fc031de 100644 --- a/Tests/RunCMake/CMP0054/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0054/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0054-OLD) run_cmake(CMP0054-NEW) diff --git a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake index efcfcab..33a5b4b 100644 --- a/Tests/RunCMake/CMP0055/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0055/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0055-OLD-Out-of-Scope) run_cmake(CMP0055-NEW-Out-of-Scope) diff --git a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake index 719e054..76eaca6 100644 --- a/Tests/RunCMake/CMP0057/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0057/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0057-OLD) run_cmake(CMP0057-WARN) diff --git a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt index e2c280e..7230a07 100644 --- a/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt +++ b/Tests/RunCMake/CMP0060/CMP0060-WARN-ON-stderr.txt @@ -12,5 +12,5 @@ will ask the linker to search for these by library name. Call Stack \(most recent call first\): CMP0060-WARN-ON.cmake:[0-9]+ \(include\) - CMakeLists.txt:4 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CMP0060/CMakeLists.txt b/Tests/RunCMake/CMP0060/CMakeLists.txt index 291d34d..db6b701 100644 --- a/Tests/RunCMake/CMP0060/CMakeLists.txt +++ b/Tests/RunCMake/CMP0060/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.9) -cmake_policy(VERSION 3.2) +cmake_minimum_required(VERSION 3.2) project(${RunCMake_TEST} C) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake index 445156f..b7eae5a 100644 --- a/Tests/RunCMake/CMP0060/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0060/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) function(run_cmake_CMP0060 CASE) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0060-${CASE}-build) diff --git a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake index 26e0a91..4c68510 100644 --- a/Tests/RunCMake/CMP0064/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0064/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(CMP0064-OLD) run_cmake(CMP0064-WARN) diff --git a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake index e86b50e..1ca4605 100644 --- a/Tests/RunCMake/CMP0065/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0065/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(OLDBad1) if(NOT CMAKE_SYSTEM_NAME STREQUAL "AIX") diff --git a/Tests/RunCMake/CMP0081/CMakeLists.txt b/Tests/RunCMake/CMP0081/CMakeLists.txt index ef2163c..44025d3 100644 --- a/Tests/RunCMake/CMP0081/CMakeLists.txt +++ b/Tests/RunCMake/CMP0081/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.12) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0102/CMakeLists.txt b/Tests/RunCMake/CMP0102/CMakeLists.txt index ef2163c..2632ffa 100644 --- a/Tests/RunCMake/CMP0102/CMakeLists.txt +++ b/Tests/RunCMake/CMP0102/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.16) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0106/CMakeLists.txt b/Tests/RunCMake/CMP0106/CMakeLists.txt index eafa642..0a96a26 100644 --- a/Tests/RunCMake/CMP0106/CMakeLists.txt +++ b/Tests/RunCMake/CMP0106/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.17) if (RunCMake_TEST STREQUAL "CMP0106-WARN-VTK") project(VTK NONE) else () diff --git a/Tests/RunCMake/CMP0139/CMakeLists.txt b/Tests/RunCMake/CMP0139/CMakeLists.txt index 18dfd26..5ff8d3e 100644 --- a/Tests/RunCMake/CMP0139/CMakeLists.txt +++ b/Tests/RunCMake/CMP0139/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.23) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index a7a8295..e372286 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -323,6 +323,10 @@ endif() add_RunCMake_test(ExcludeFromAll) add_RunCMake_test(ExportImport) add_RunCMake_test(ExternalData) +if(CMAKE_GENERATOR MATCHES "^(Unix Makefiles|Ninja)$" + AND NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + add_RunCMake_test(ExtraGenerators) +endif() add_RunCMake_test(FeatureSummary) add_RunCMake_test(FPHSA) if(CMAKE_USE_SYSTEM_JSONCPP) @@ -469,7 +473,15 @@ add_RunCMake_test(ctest_fixtures) add_RunCMake_test(define_property) add_RunCMake_test(file -DCYGWIN=${CYGWIN} -DMSYS=${MSYS}) add_RunCMake_test(file-CHMOD -DMSYS=${MSYS}) -add_RunCMake_test(file-DOWNLOAD -DCMake_TEST_NO_NETWORK=${CMake_TEST_NO_NETWORK}) +foreach(var + CMake_TEST_NO_NETWORK + CMake_TEST_TLS_VERIFY_URL + ) + if(DEFINED ${var}) + list(APPEND file-DOWNLOAD_ARGS -D${var}=${${var}}) + endif() +endforeach() +add_RunCMake_test(file-DOWNLOAD) add_RunCMake_test(file-RPATH -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}) add_RunCMake_test(find_file) add_RunCMake_test(find_library -DCYGWIN=${CYGWIN} -DMSYS=${MSYS}) diff --git a/Tests/RunCMake/CPack/CMakeLists.txt b/Tests/RunCMake/CPack/CMakeLists.txt index c81b34e..f210474 100644 --- a/Tests/RunCMake/CPack/CMakeLists.txt +++ b/Tests/RunCMake/CPack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) if(POLICY CMP0129) cmake_policy(SET CMP0129 NEW) diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index ef4cf5e..ca02b76 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) include(RunCMake) include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") diff --git a/Tests/RunCMake/CPackConfig/CMakeLists.txt b/Tests/RunCMake/CPackConfig/CMakeLists.txt index 1e071ec..2b3e1f9 100644 --- a/Tests/RunCMake/CPackConfig/CMakeLists.txt +++ b/Tests/RunCMake/CPackConfig/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST}) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt index 89ff7c4..404e162 100644 --- a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt +++ b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar Binary files differindex c24af48..7cfcb36 100644 --- a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar +++ b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar diff --git a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt +++ b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt b/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt +++ b/Tests/RunCMake/CSharpReferenceImport/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CTest/CMakeLists.txt b/Tests/RunCMake/CTest/CMakeLists.txt index f1a83e8..1319aec 100644 --- a/Tests/RunCMake/CTest/CMakeLists.txt +++ b/Tests/RunCMake/CTest/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(NOT NoProject) project(${RunCMake_TEST} NONE) endif() diff --git a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/CTestCommandLine/CMakeLists.txt +++ b/Tests/RunCMake/CTestCommandLine/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CTestCommandLine/test.cmake.in b/Tests/RunCMake/CTestCommandLine/test.cmake.in index b82968a..11bede7 100644 --- a/Tests/RunCMake/CTestCommandLine/test.cmake.in +++ b/Tests/RunCMake/CTestCommandLine/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in index e9592f6..cfcf56d 100644 --- a/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in +++ b/Tests/RunCMake/CTestTimeoutAfterMatch/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(TimeoutAfterMatch NONE) include(CTest) add_test(NAME SleepFor1Second COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_SOURCE_DIR}/SleepFor1Second.cmake) diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in b/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in index d049c9f..172d2c6 100644 --- a/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in +++ b/Tests/RunCMake/CTestTimeoutAfterMatch/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/CacheNewline/CacheNewline.cmake b/Tests/RunCMake/CacheNewline/CacheNewline.cmake index 81851db..418a847 100644 --- a/Tests/RunCMake/CacheNewline/CacheNewline.cmake +++ b/Tests/RunCMake/CacheNewline/CacheNewline.cmake @@ -1,5 +1 @@ -cmake_minimum_required(VERSION 3.5) - -project(CacheNewlineTest NONE) - set(NEWLINE_VARIABLE "a\nb" CACHE STRING "Offending entry") diff --git a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt index 4a13d29..9f18d8d 100644 --- a/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt +++ b/Tests/RunCMake/CheckIPOSupported/CMakeLists.txt @@ -1,7 +1,5 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.9) project(${RunCMake_TEST} NONE) -cmake_policy(SET CMP0069 NEW) - include(CheckIPOSupported) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt index 842c5cf..93ee9df 100644 --- a/Tests/RunCMake/CheckModules/CMakeLists.txt +++ b/Tests/RunCMake/CheckModules/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) -cmake_policy(SET CMP0054 NEW) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/CommandLine/CMakeLists.txt +++ b/Tests/RunCMake/CommandLine/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 7ff417b..205949b 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) include(RunCMake) diff --git a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt index 4fee9bc..b900686 100644 --- a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt +++ b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt @@ -1,2 +1,2 @@ -^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \) +^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \) .*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt index 74429b6..88aad00 100644 --- a/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt +++ b/Tests/RunCMake/CommandLine/trace-expand-warn-uninitialized-stderr.txt @@ -1,2 +1,2 @@ -^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \) +^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \) .*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(trace-expand-warn-uninitialized NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-stderr.txt b/Tests/RunCMake/CommandLine/trace-stderr.txt index 8e8ddfa..4bf3cff 100644 --- a/Tests/RunCMake/CommandLine/trace-stderr.txt +++ b/Tests/RunCMake/CommandLine/trace-stderr.txt @@ -1,2 +1,2 @@ -^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \) +^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.5 \) .*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake b/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake index 982cb89..4107aa4 100644 --- a/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake +++ b/Tests/RunCMake/CommandLine/trace-try_compile-redirect.cmake @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 3.24) -project(test C) +cmake_policy(VERSION 3.24) +enable_language(C) diff --git a/Tests/RunCMake/CommandLine/trace-try_compile.cmake b/Tests/RunCMake/CommandLine/trace-try_compile.cmake index 982cb89..4107aa4 100644 --- a/Tests/RunCMake/CommandLine/trace-try_compile.cmake +++ b/Tests/RunCMake/CommandLine/trace-try_compile.cmake @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 3.24) -project(test C) +cmake_policy(VERSION 3.24) +enable_language(C) diff --git a/Tests/RunCMake/CommandLineTar/CMakeLists.txt b/Tests/RunCMake/CommandLineTar/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/CommandLineTar/CMakeLists.txt +++ b/Tests/RunCMake/CommandLineTar/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt index ebab7a3..12a7fd4 100644 --- a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt +++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake index 64b52d9..60a4246 100644 --- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake +++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake @@ -1,7 +1,4 @@ - -cmake_minimum_required(VERSION 3.3) - -project(CompatibleInterface) +enable_language(CXX) include(GenerateExportHeader) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt +++ b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompileFeatures/CMakeLists.txt b/Tests/RunCMake/CompileFeatures/CMakeLists.txt index 3482e6b..12a7fd4 100644 --- a/Tests/RunCMake/CompileFeatures/CMakeLists.txt +++ b/Tests/RunCMake/CompileFeatures/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompilerArgs/CMakeLists.txt b/Tests/RunCMake/CompilerArgs/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/CompilerArgs/CMakeLists.txt +++ b/Tests/RunCMake/CompilerArgs/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompilerChange/CMakeLists.txt b/Tests/RunCMake/CompilerChange/CMakeLists.txt index 14c47ad..b41f3f3 100644 --- a/Tests/RunCMake/CompilerChange/CMakeLists.txt +++ b/Tests/RunCMake/CompilerChange/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(NOT RunCMake_TEST) set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted endif() diff --git a/Tests/RunCMake/CompilerLauncher/CMakeLists.txt b/Tests/RunCMake/CompilerLauncher/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/CompilerLauncher/CMakeLists.txt +++ b/Tests/RunCMake/CompilerLauncher/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Configure/CMakeLists.txt b/Tests/RunCMake/Configure/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/Configure/CMakeLists.txt +++ b/Tests/RunCMake/Configure/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt index 2d75985..12a7fd4 100644 --- a/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt +++ b/Tests/RunCMake/CrosscompilingEmulator/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake index 208ea20..f3974ea 100644 --- a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake +++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) foreach(p CMP0029 diff --git a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt +++ b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/ExternalData/CMakeLists.txt +++ b/Tests/RunCMake/ExternalData/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake index 364bf9e..02c7c8e 100644 --- a/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION ${CMAKE_VERSION}) +cmake_policy(VERSION ${CMAKE_VERSION}) if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12) cmake_policy(SET CMP0114 NEW) else() diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake index da823cd..31b7baf 100644 --- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_no_target.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION ${CMAKE_VERSION}) +cmake_policy(VERSION ${CMAKE_VERSION}) if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12) cmake_policy(SET CMP0114 NEW) else() diff --git a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake index 2946c0b..351d70f 100644 --- a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake +++ b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.3) - # If we are using the Ninja generator, we can check and verify that the # USES_TERMINAL option actually works by examining the Ninja build file. # This is the only way, since CMake doesn't offer a way to examine the diff --git a/Tests/RunCMake/ExtraGenerators/CMakeLists.txt b/Tests/RunCMake/ExtraGenerators/CMakeLists.txt new file mode 100644 index 0000000..93ee9df --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.5) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake b/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake new file mode 100644 index 0000000..fbef79c --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/RunCMakeTest.cmake @@ -0,0 +1,19 @@ +include(RunCMake) + +foreach( + extraGenerator + IN ITEMS + "CodeBlocks" + "CodeLite" + "Eclipse CDT4" + "Kate" + "Sublime Text 2" + ) + block() + set(RunCMake_GENERATOR "${extraGenerator} - ${RunCMake_GENERATOR}") + set(RunCMake_TEST_VARIANT_DESCRIPTION ": ${RunCMake_GENERATOR}") + string(REPLACE " " "" extraGeneratorNoSpaces "${extraGenerator}") + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Simple-${extraGeneratorNoSpaces}) + run_cmake(Simple) + endblock() +endforeach() diff --git a/Tests/RunCMake/ExtraGenerators/Simple.cmake b/Tests/RunCMake/ExtraGenerators/Simple.cmake new file mode 100644 index 0000000..d077046 --- /dev/null +++ b/Tests/RunCMake/ExtraGenerators/Simple.cmake @@ -0,0 +1,4 @@ +enable_language(C) +enable_language(CXX) + +add_subdirectory(../../Simple Simple) diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/FPHSA/CMakeLists.txt +++ b/Tests/RunCMake/FPHSA/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FeatureSummary/CMakeLists.txt b/Tests/RunCMake/FeatureSummary/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/FeatureSummary/CMakeLists.txt +++ b/Tests/RunCMake/FeatureSummary/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/File_Archive/CMakeLists.txt b/Tests/RunCMake/File_Archive/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/File_Archive/CMakeLists.txt +++ b/Tests/RunCMake/File_Archive/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt index 3178de5..eec672f 100644 --- a/Tests/RunCMake/File_Generate/CMakeLists.txt +++ b/Tests/RunCMake/File_Generate/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) if(NOT TEST_FILE) set(TEST_FILE ${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake b/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake index e0585ee..b20f824 100644 --- a/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake +++ b/Tests/RunCMake/FindGTK2/FindGTK2RunTwice.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.7) -project(testFindGTK2 C) +enable_language(C) # First call find_package(GTK2 REQUIRED) diff --git a/Tests/RunCMake/FindLua/CMakeLists.txt b/Tests/RunCMake/FindLua/CMakeLists.txt index a2c4d98..e6c41a5 100644 --- a/Tests/RunCMake/FindLua/CMakeLists.txt +++ b/Tests/RunCMake/FindLua/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} C) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindMatlab/CMakeLists.txt b/Tests/RunCMake/FindMatlab/CMakeLists.txt index 1b9a957..93ee9df 100644 --- a/Tests/RunCMake/FindMatlab/CMakeLists.txt +++ b/Tests/RunCMake/FindMatlab/CMakeLists.txt @@ -1,3 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) +project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake index b4cc741..8eaf903 100644 --- a/Tests/RunCMake/FindMatlab/MatlabTest1.cmake +++ b/Tests/RunCMake/FindMatlab/MatlabTest1.cmake @@ -1,7 +1,6 @@ - -cmake_minimum_required (VERSION 2.8.12) +enable_language(C) +enable_language(CXX) enable_testing() -project(test_should_fail) if(NOT "${matlab_root}" STREQUAL "") set(Matlab_ROOT_DIR ${matlab_root}) diff --git a/Tests/RunCMake/FindMatlab/MatlabTest2.cmake b/Tests/RunCMake/FindMatlab/MatlabTest2.cmake index 4295d3c..95b1c22 100644 --- a/Tests/RunCMake/FindMatlab/MatlabTest2.cmake +++ b/Tests/RunCMake/FindMatlab/MatlabTest2.cmake @@ -1,6 +1,6 @@ -cmake_minimum_required (VERSION 2.8.12) +enable_language(C) +enable_language(CXX) enable_testing() -project(findmatlab_runcmake_test2) if(NOT DEFINED matlab_required) set(matlab_required REQUIRED) diff --git a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake index deebf89..45dc799 100644 --- a/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindMatlab/RunCMakeTest.cmake @@ -1,7 +1,5 @@ - include(RunCMake) - if(NOT "${MCR_ROOT}" STREQUAL "") if(NOT EXISTS "${MCR_ROOT}") message(FATAL_ERROR "MCR does not exist ${MCR_ROOT}") diff --git a/Tests/RunCMake/FindOpenSSL/version-exact.cmake b/Tests/RunCMake/FindOpenSSL/version-exact.cmake index 29c2ce3..11826cf 100644 --- a/Tests/RunCMake/FindOpenSSL/version-exact.cmake +++ b/Tests/RunCMake/FindOpenSSL/version-exact.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.19...3.20) - find_package (OpenSSL REQUIRED COMPONENTS Crypto) # Store version without a possibly trailing letter. string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}") diff --git a/Tests/RunCMake/FindOpenSSL/version-range.cmake b/Tests/RunCMake/FindOpenSSL/version-range.cmake index 9390032..f9689b6 100644 --- a/Tests/RunCMake/FindOpenSSL/version-range.cmake +++ b/Tests/RunCMake/FindOpenSSL/version-range.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.19...3.20) - find_package (OpenSSL REQUIRED COMPONENTS Crypto) # Store version without a possibly trailing letter. string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}") diff --git a/Tests/RunCMake/FindOpenSSL/version.cmake b/Tests/RunCMake/FindOpenSSL/version.cmake index d06cd1f..3d151ab 100644 --- a/Tests/RunCMake/FindOpenSSL/version.cmake +++ b/Tests/RunCMake/FindOpenSSL/version.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.19...3.20) - find_package (OpenSSL REQUIRED COMPONENTS Crypto) # Store version without a possibly trailing letter. string (REGEX MATCH "^([0-9.]+)" version "${OPENSSL_VERSION}") diff --git a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt +++ b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake index 69ab4da..457747f 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.12) - -project(FindPkgConfig_IMPORTED_TARGET C) +enable_language(C) find_package(PkgConfig REQUIRED) pkg_check_modules(NCURSES IMPORTED_TARGET QUIET ncurses) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake index f7a9815..95a2e32 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_VERSION_OPERATORS.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.12) - -project(FindPkgConfig_IMPORTED_TARGET C) +enable_language(C) find_package(PkgConfig REQUIRED) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake index d0046ca..15baa0d 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.3) - find_package(PkgConfig REQUIRED) pkg_check_modules(NCURSES QUIET ncurses) diff --git a/Tests/RunCMake/FindSWIG/version-exact.cmake b/Tests/RunCMake/FindSWIG/version-exact.cmake index ec3651f..98903ff 100644 --- a/Tests/RunCMake/FindSWIG/version-exact.cmake +++ b/Tests/RunCMake/FindSWIG/version-exact.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.18...3.19) - find_package (SWIG) if (NOT SWIG_FOUND) message (FATAL_ERROR "Failed to find SWIG") diff --git a/Tests/RunCMake/FindSWIG/version-range.cmake b/Tests/RunCMake/FindSWIG/version-range.cmake index 7ba1134..e776961 100644 --- a/Tests/RunCMake/FindSWIG/version-range.cmake +++ b/Tests/RunCMake/FindSWIG/version-range.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.18...3.19) - find_package (SWIG) if (NOT SWIG_FOUND) message (FATAL_ERROR "Failed to find SWIG") diff --git a/Tests/RunCMake/FindSWIG/version.cmake b/Tests/RunCMake/FindSWIG/version.cmake index a4f1c39..b5ed6a7 100644 --- a/Tests/RunCMake/FindSWIG/version.cmake +++ b/Tests/RunCMake/FindSWIG/version.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required (VERSION 3.18...3.19) - find_package (SWIG 1.0) if (NOT SWIG_FOUND) message (FATAL_ERROR "Failed to find SWIG with version 1.0") diff --git a/Tests/RunCMake/Framework/CMakeLists.txt b/Tests/RunCMake/Framework/CMakeLists.txt index 6dd8cdf..93ee9df 100644 --- a/Tests/RunCMake/Framework/CMakeLists.txt +++ b/Tests/RunCMake/Framework/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Framework/FrameworkConsumption.cmake b/Tests/RunCMake/Framework/FrameworkConsumption.cmake index 58b70a3..a1ce006 100644 --- a/Tests/RunCMake/Framework/FrameworkConsumption.cmake +++ b/Tests/RunCMake/Framework/FrameworkConsumption.cmake @@ -1,5 +1,3 @@ - -cmake_minimum_required(VERSION 3.22...3.24) enable_language(C) # Create framework and ensure header is placed in Headers diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake index 84012aa..d09e8a0 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.4) enable_language(C) set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE INTERNAL "Supported configuration types") diff --git a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt +++ b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt index 4b3de84..93ee9df 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-TARGET_FILE/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake index 7eec527..187e7d6 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME-imported-target.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (GENERATE_CONTENT [[ diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake index 1963244..d550431 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_BASE_NAME.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (GENERATE_CONTENT [[ diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake index cc9cd5a..01926fe 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX-imported-target.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake index edfb40c..a9a76bf 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_PREFIX.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake index 3ee42a5..ddf3887 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX-imported-target.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake index 1fe75d9..9c5d932 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake +++ b/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_SUFFIX.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.14) - enable_language (C) set (win_platforms Windows CYGWIN MSYS) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake index 212c034..eed194b 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/ALIAS_GLOBAL.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.17) - add_library(lib-global SHARED IMPORTED GLOBAL) add_library(alias-lib-global ALIAS lib-global) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt index 26a73f9..32d92d8 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.10) if(RunCMake_TEST STREQUAL "LOCATION") cmake_minimum_required(VERSION 2.8.12) # Leave CMP0026 unset. endif() diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake index e9855be..0f0c399 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.14) enable_language(C) add_library(foo1 STATIC empty.c) diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt index a4c8dcd..fab2ce2 100644 --- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt +++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/LOCATION-stderr.txt @@ -1,3 +1,10 @@ +^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ CMake Warning \(dev\) in CMakeLists\.txt: Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 2d545d9..b139210 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(BadIF) run_cmake(BadCONFIG) diff --git a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt +++ b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt +++ b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt index 37747a1..d0aef2c 100644 --- a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt +++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMakeLists.txt:[0-9]+ \(cmake_minimum_required\): The OLD behavior for policy CMP0052 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/IfacePaths/CMakeLists.txt b/Tests/RunCMake/IfacePaths/CMakeLists.txt index 5cd4825..0d707f0 100644 --- a/Tests/RunCMake/IfacePaths/CMakeLists.txt +++ b/Tests/RunCMake/IfacePaths/CMakeLists.txt @@ -1,4 +1,8 @@ -cmake_minimum_required(VERSION 3.0) +if(RunCMake_TEST MATCHES "-CMP0052") + cmake_minimum_required(VERSION 3.0) +else() + cmake_minimum_required(VERSION 3.5) +endif() project(${RunCMake_TEST} NONE) if(NOT TEST_FILE) set(TEST_FILE ${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt index 37747a1..4db8209 100644 --- a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt +++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\): +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): The OLD behavior for policy CMP0052 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt +++ b/Tests/RunCMake/IncludeWhatYouUse/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt +++ b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/InterfaceLibrary/genex_link.cmake b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake index 0dbf029..3445864 100644 --- a/Tests/RunCMake/InterfaceLibrary/genex_link.cmake +++ b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake @@ -1,7 +1,4 @@ - -cmake_minimum_required(VERSION 2.8.12.20131125 FATAL_ERROR) - -project(genex_link) +enable_language(CXX) set(_main_cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp) file(WRITE ${_main_cpp} diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake index 575fcc6..4a8ca37 100644 --- a/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake +++ b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_policy(SET CMP0037 OLD) add_library(if$ace INTERFACE) add_library(iface::target INTERFACE) diff --git a/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake index ed81878..eae8f57 100644 --- a/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake +++ b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake @@ -1,5 +1,3 @@ - -cmake_minimum_required(VERSION 2.8.12.20131009) set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) add_library(foo INTERFACE) target_compile_definitions(foo INTERFACE FOO_DEFINE) diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/Languages/CMakeLists.txt +++ b/Tests/RunCMake/Languages/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt index b7a0755..55aa1bb 100644 --- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt +++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-iface-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMP0028-OLD-iface.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0028-OLD-iface\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0028 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt index 586a876..f11d8f5 100644 --- a/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt +++ b/Tests/RunCMake/LinkItemValidation/CMP0028-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMP0028-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists\.txt:3 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0028-OLD\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0028 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/LinkItemValidation/CMakeLists.txt b/Tests/RunCMake/LinkItemValidation/CMakeLists.txt index 185cd91..6e1f8a2 100644 --- a/Tests/RunCMake/LinkItemValidation/CMakeLists.txt +++ b/Tests/RunCMake/LinkItemValidation/CMakeLists.txt @@ -1,6 +1,6 @@ -cmake_minimum_required(VERSION 2.8.12) -if(NOT RunCMake_TEST MATCHES "^CMP0028") - cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.5) +if(RunCMake_TEST MATCHES "^CMP0028") + cmake_minimum_required(VERSION 2.8.12) endif() project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir diff --git a/Tests/RunCMake/LinkStatic/CMakeLists.txt b/Tests/RunCMake/LinkStatic/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/LinkStatic/CMakeLists.txt +++ b/Tests/RunCMake/LinkStatic/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt b/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt +++ b/Tests/RunCMake/LinkWhatYouUse/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Make/CMakeLists.txt b/Tests/RunCMake/Make/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/Make/CMakeLists.txt +++ b/Tests/RunCMake/Make/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Ninja/AssumedSources.cmake b/Tests/RunCMake/Ninja/AssumedSources.cmake index d5364f0..d68fca9 100644 --- a/Tests/RunCMake/Ninja/AssumedSources.cmake +++ b/Tests/RunCMake/Ninja/AssumedSources.cmake @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 3.8) cmake_policy(SET CMP0118 NEW) -project(AssumedSources) +enable_language(C) set_source_files_properties( "${CMAKE_CURRENT_BINARY_DIR}/target.c" diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt index 9a606ee..6d340b0 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by-stderr.txt @@ -1,6 +1,15 @@ -^CMake Deprecation Warning at CMP0058-OLD-by.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\) ++ +CMake Deprecation Warning at CMP0058-OLD-by\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0058 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake index 92a3a0f..45e5aa3 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-by.cmake @@ -1,3 +1,4 @@ +cmake_policy(VERSION 3.2) cmake_policy(SET CMP0058 OLD) set(byproducts BYPRODUCTS byproduct1a byproduct1b) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt index ba6e5da..834c781 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no-stderr.txt @@ -1,6 +1,15 @@ -^CMake Deprecation Warning at CMP0058-OLD-no.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\) ++ +CMake Deprecation Warning at CMP0058-OLD-no\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0058 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake index 0326e07..388e018 100644 --- a/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-OLD-no.cmake @@ -1,2 +1,3 @@ +cmake_policy(VERSION 3.2) cmake_policy(SET CMP0058 OLD) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt new file mode 100644 index 0000000..2927f52 --- /dev/null +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by-stderr.txt @@ -0,0 +1,8 @@ +^CMake Deprecation Warning at CMP0058-WARN-by\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\)$ diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake index 6128167..6f5484a 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-by.cmake @@ -1,2 +1,3 @@ +cmake_policy(VERSION 3.2) set(byproducts BYPRODUCTS byproduct1a byproduct1b) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt index 439a2d9..1ffb416 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no-stderr.txt @@ -1,4 +1,13 @@ -^CMake Warning \(dev\): +^CMake Deprecation Warning at CMP0058-WARN-no\.cmake:[0-9] \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9] \(include\) ++ +CMake Warning \(dev\): Policy CMP0058 is not set: Ninja requires custom command byproducts to be explicit. Run "cmake --help-policy CMP0058" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake index 7bc66ef..714ae64 100644 --- a/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake +++ b/Tests/RunCMake/Ninja/CMP0058-WARN-no.cmake @@ -1 +1,2 @@ +cmake_policy(VERSION 3.2) include(CMP0058-common.cmake) diff --git a/Tests/RunCMake/Ninja/CMakeLists.txt b/Tests/RunCMake/Ninja/CMakeLists.txt index 2a0591e..8eb5748 100644 --- a/Tests/RunCMake/Ninja/CMakeLists.txt +++ b/Tests/RunCMake/Ninja/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/Ninja/CommandConcat.cmake b/Tests/RunCMake/Ninja/CommandConcat.cmake index 790cf9d..7d6faf5 100644 --- a/Tests/RunCMake/Ninja/CommandConcat.cmake +++ b/Tests/RunCMake/Ninja/CommandConcat.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.7) -project(concat_cmd NONE) set(output1 ${CMAKE_BINARY_DIR}/out1.txt) set(output2 ${CMAKE_BINARY_DIR}/out2.txt) file(REMOVE ${output1} ${output2}) diff --git a/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake b/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake new file mode 100644 index 0000000..e0c2434 --- /dev/null +++ b/Tests/RunCMake/Ninja/CustomCommandExplicitDepends.cmake @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.26) +project(CustomCommandExplicitDepends C) + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command.h" + COMMAND "${CMAKE_COMMAND}" -E touch + "${CMAKE_CURRENT_BINARY_DIR}/command.h" + COMMENT "Creating command.h" + DEPENDS_EXPLICIT_ONLY +) + +add_library(dep STATIC dep.c) + +add_library(top STATIC + top.c + "${CMAKE_CURRENT_BINARY_DIR}/command.h" +) +target_link_libraries(top PRIVATE dep) diff --git a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake index 8e01c8c..e04ac21 100644 --- a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake +++ b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.5) -project(hello NONE) - add_custom_command( OUTPUT hello.copy.c COMMAND "${CMAKE_COMMAND}" -E copy diff --git a/Tests/RunCMake/Ninja/Executable.cmake b/Tests/RunCMake/Ninja/Executable.cmake index 4e17d68..2b6a61b 100644 --- a/Tests/RunCMake/Ninja/Executable.cmake +++ b/Tests/RunCMake/Ninja/Executable.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) add_executable(hello hello.c) include(CheckOutput.cmake) include(CheckNoPrefixSubDir.cmake) diff --git a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake index 360c7ba..90f8249 100644 --- a/Tests/RunCMake/Ninja/LooseObjectDepends.cmake +++ b/Tests/RunCMake/Ninja/LooseObjectDepends.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.8) -project(LooseObjectDepends C) +enable_language(C) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/command.h" diff --git a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake index 505f750..9615c56 100644 --- a/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake +++ b/Tests/RunCMake/Ninja/PreventConfigureFileDupBuildRule.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.12) -project(Test LANGUAGES C) +enable_language(C) configure_file(PreventConfigureFileDupBuildRule.cmake PreventTargetAliasesDupBuildRule.cmake @ONLY) add_subdirectory(SubDirConfigureFileDup) diff --git a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake index da6f86a..81eb731 100644 --- a/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake +++ b/Tests/RunCMake/Ninja/PreventTargetAliasesDupBuildRule.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.12) -project(Test LANGUAGES C) +enable_language(C) # fake launcher executable set(input_launcher_executable ${CMAKE_CURRENT_BINARY_DIR}/fake_launcher_executable) diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 9214e90..17ad035 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -190,6 +190,18 @@ function (run_LooseObjectDepends) endfunction () run_LooseObjectDepends() +function (run_CustomCommandExplictDepends) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandExplicitDepends-build) + run_cmake(CustomCommandExplicitDepends) + run_ninja("${RunCMake_TEST_BINARY_DIR}" "command.h") + if (EXISTS "${RunCMake_TEST_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}dep${CMAKE_STATIC_LIBRARY_SUFFIX}") + message(FATAL_ERROR + "The `dep` library was created when requesting an custom command to be " + "generated; this should no longer be necessary when passing DEPENDS_EXPLICIT_ONLY keyword.") + endif () +endfunction () +run_CustomCommandExplictDepends() + function (run_AssumedSources) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AssumedSources-build) run_cmake(AssumedSources) diff --git a/Tests/RunCMake/Ninja/SharedLib.cmake b/Tests/RunCMake/Ninja/SharedLib.cmake index 1a78390..c295c16 100644 --- a/Tests/RunCMake/Ninja/SharedLib.cmake +++ b/Tests/RunCMake/Ninja/SharedLib.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) add_library(greeting SHARED greeting.c) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_executable(hello hello_with_greeting.c) diff --git a/Tests/RunCMake/Ninja/StaticLib.cmake b/Tests/RunCMake/Ninja/StaticLib.cmake index 0f815ae..dab6742 100644 --- a/Tests/RunCMake/Ninja/StaticLib.cmake +++ b/Tests/RunCMake/Ninja/StaticLib.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) add_definitions(-DGREETING_STATIC) add_library(greeting STATIC greeting.c) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/RunCMake/Ninja/SubDirPrefix.cmake b/Tests/RunCMake/Ninja/SubDirPrefix.cmake index 30ad1e6..49d075f 100644 --- a/Tests/RunCMake/Ninja/SubDirPrefix.cmake +++ b/Tests/RunCMake/Ninja/SubDirPrefix.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") add_subdirectory(SubDirPrefix) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/RunCMake/Ninja/TwoLibs.cmake b/Tests/RunCMake/Ninja/TwoLibs.cmake index 666452f..10ac5a6 100644 --- a/Tests/RunCMake/Ninja/TwoLibs.cmake +++ b/Tests/RunCMake/Ninja/TwoLibs.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.5) -project(hello C) +enable_language(C) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib-static") diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt index 2897109..3e470a2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.14) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index 75c26a7..6027f03 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.14) -project(Minimal NONE) - # # list of targets to test. to add a target: put its files in the data # subdirectory and add it to this list... we run each target's diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt index 2897109..3e470a2 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt +++ b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.14) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index df4ef1f..fa7bf07 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.14) -project(Minimal NONE) - # # list of targets to test. to add a target: put its files in the data # subdirectory and add it to this list... we run each target's diff --git a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake index abd27f4..da608b3 100644 --- a/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake +++ b/Tests/RunCMake/PolicyScope/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(NotClosed) run_cmake(NotOpened) diff --git a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt index c3922d6..42b0577 100644 --- a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt +++ b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt @@ -1,5 +1,4 @@ - -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) # MSVC creates extra targets which pollute the stderr unless we set this. diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 54d7eb5..e1c923d 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -186,6 +186,18 @@ function(run_cmake test) "|[^\n]*Bullseye Testing Technology" ")[^\n]*\n)+" ) + if(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION) + string(REGEX REPLACE [[ +^CMake Deprecation Warning at [^ +]*CMakeLists.txt:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +]] "" actual_stderr "${actual_stderr}") + endif() foreach(o IN ITEMS stdout stderr config) string(REGEX REPLACE "\r\n" "\n" actual_${o} "${actual_${o}}") string(REGEX REPLACE "${ignore_line_regex}" "\\1" actual_${o} "${actual_${o}}") diff --git a/Tests/RunCMake/Swift/CMakeLists.txt b/Tests/RunCMake/Swift/CMakeLists.txt index 74b3ff8..77030d6 100644 --- a/Tests/RunCMake/Swift/CMakeLists.txt +++ b/Tests/RunCMake/Swift/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.15) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt b/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt index 874bdc7..16d2e21 100644 --- a/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt +++ b/Tests/RunCMake/Swift/SwiftMultiArch-stderr.txt @@ -1,4 +1,4 @@ -^CMake Error at SwiftMultiArch.cmake:3 \(project\): +^CMake Error at SwiftMultiArch.cmake:2 \(enable_language\): multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift Call Stack \(most recent call first\): CMakeLists.txt:3 diff --git a/Tests/RunCMake/Swift/SwiftMultiArch.cmake b/Tests/RunCMake/Swift/SwiftMultiArch.cmake index 5fdb688..b59bb62 100644 --- a/Tests/RunCMake/Swift/SwiftMultiArch.cmake +++ b/Tests/RunCMake/Swift/SwiftMultiArch.cmake @@ -1,4 +1,2 @@ -cmake_minimum_required(VERSION 3.15.1) set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;i386;x86_64") -project(SwiftMultiArch - LANGUAGES Swift) +enable_language(Swift) diff --git a/Tests/RunCMake/SymlinkTrees/CMakeLists.txt b/Tests/RunCMake/SymlinkTrees/CMakeLists.txt index e16faea..919a168 100644 --- a/Tests/RunCMake/SymlinkTrees/CMakeLists.txt +++ b/Tests/RunCMake/SymlinkTrees/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) message(STATUS "source: '${CMAKE_SOURCE_DIR}'") diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index f0c287c..f56ac64 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(BOM-UTF-8) run_cmake(BOM-UTF-16-LE) diff --git a/Tests/RunCMake/Syntax/String1-stderr.txt b/Tests/RunCMake/Syntax/String1-stderr.txt index 07e98da..382ea00 100644 --- a/Tests/RunCMake/Syntax/String1-stderr.txt +++ b/Tests/RunCMake/Syntax/String1-stderr.txt @@ -1,3 +1,3 @@ -^ +^' 1 \${var} 4 - $ + '$ diff --git a/Tests/RunCMake/Syntax/String1.cmake b/Tests/RunCMake/Syntax/String1.cmake index a94c9ff..20ed3c1 100644 --- a/Tests/RunCMake/Syntax/String1.cmake +++ b/Tests/RunCMake/Syntax/String1.cmake @@ -1,3 +1,3 @@ -message(" +message("' 1 \${var} 4 - ") + '") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt index b309c3b..c7238df 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt @@ -1,7 +1,7 @@ -CMake Error at UnterminatedBrace0.cmake:2 \(set\): +CMake Error at UnterminatedBrace0.cmake:1 \(set\): Syntax error in cmake code at - .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:2 + .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:1 when parsing string diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake index 0da1290..09af0ce 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake @@ -1,2 +1 @@ -cmake_minimum_required(VERSION 3.0) set(var "${") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt index ffe0e2a..3d88f36 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt +++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt @@ -1,7 +1,7 @@ -CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\): +CMake Warning \(dev\) at UnterminatedBrace1.cmake:2 \(set\): Syntax error in cmake code at - .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:3 + .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:2 when parsing string diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake index 93fba34..8b40b19 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake +++ b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake @@ -1,3 +1,2 @@ -cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0010 OLD) set(var "${") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt index b332d34..0d76251 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt @@ -1,7 +1,7 @@ -CMake Error at UnterminatedBrace2.cmake:4 \(set\): +CMake Error at UnterminatedBrace2.cmake:3 \(set\): Syntax error in cmake code at - .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:4 + .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:3 when parsing string diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake index a650e5b..30d4d4d 100644 --- a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0010 OLD) cmake_policy(SET CMP0053 NEW) set(var "${") diff --git a/Tests/RunCMake/TargetProperties/CMakeLists.txt b/Tests/RunCMake/TargetProperties/CMakeLists.txt index 44b5d30..26f536b 100644 --- a/Tests/RunCMake/TargetProperties/CMakeLists.txt +++ b/Tests/RunCMake/TargetProperties/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST}) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/VSSolution/CMakeLists.txt b/Tests/RunCMake/VSSolution/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/VSSolution/CMakeLists.txt +++ b/Tests/RunCMake/VSSolution/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake index 7a000ee..133dbe1 100644 --- a/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake +++ b/Tests/RunCMake/VisibilityPreset/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) run_cmake(PropertyTypo) run_cmake(CMP0063-OLD) diff --git a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake index bd914f8..623ef2a 100644 --- a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake +++ b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake @@ -1,7 +1,5 @@ -cmake_minimum_required(VERSION 3.22) - # a simple CSharp only test case -project (DotNetSdk CSharp) +enable_language(CSharp) set(CMAKE_DOTNET_TARGET_FRAMEWORK net472) set(CMAKE_DOTNET_SDK "Microsoft.NET.Sdk") diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt index 872338d..1d0bd70 100644 --- a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake index 1f3c19d..68372a1 100644 --- a/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake +++ b/Tests/RunCMake/XcodeProject/BundleLinkBundle.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.23) - -project(BundleLinkBundle CXX) +enable_language(CXX) add_subdirectory(lib_bundle) diff --git a/Tests/RunCMake/XcodeProject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/XcodeProject/CMakeLists.txt +++ b/Tests/RunCMake/XcodeProject/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake index 3d8fa17..234ceef 100644 --- a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake +++ b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.10) -project(DeploymentTarget C) +enable_language(C) # using Xcode 7.1 SDK versions for deployment targets diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake index a9ea717..b42e933 100644 --- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake +++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake @@ -45,7 +45,6 @@ endforeach() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/CMakeLists.txt [[ -cmake_minimum_required(VERSION 3.18) project(ExternalFrameworks) add_library(staticFrameworkExt STATIC func6.c) add_library(sharedFrameworkExt SHARED func7.c) diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake index e72bf4d..ab64db7 100644 --- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake +++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase_Funcs.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.18...3.19) macro(returnOnError errorMsg) if(NOT "${errorMsg}" STREQUAL "") diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake index bc14874..a9fafd2 100644 --- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake @@ -1,6 +1,5 @@ # check if Xcode and CMake have the same understanding of Bundle layout -cmake_minimum_required(VERSION 3.3) enable_language(C) if(CMAKE_SYSTEM_NAME STREQUAL "iOS") diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake index 8426148..f8eccc7 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(IOSInstallCombined CXX) +enable_language(CXX) set(maybe_armv7 armv7) set(maybe_i386 i386) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake index 7d14d19..e719428 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(XcodeIOSInstallCombinedPrune CXX) +enable_language(CXX) if(XCODE_VERSION VERSION_GREATER_EQUAL 9) set(CMAKE_OSX_DEPLOYMENT_TARGET 10) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake index 5177ec2..cb22e51 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(XcodeIOSInstallCombinedSingleArch CXX) +enable_language(CXX) set(iphoneos_arch armv7) if(XCODE_VERSION VERSION_GREATER_EQUAL 14) diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake index 75da7b1..fccd4c6 100644 --- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.3) - -project(XcodeInstallIOS) +enable_language(CXX) set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake index a1064f4..b334b7d 100644 --- a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.3) enable_language(CXX) set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME ON) diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake index 4840276..8f54046 100644 --- a/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeObjcFlags.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.15) -project(objctest LANGUAGES C OBJC) +enable_language(C) +enable_language(OBJC) include(CheckOBJCCompilerFlag) check_objc_compiler_flag(-fobjc-arc HAVE_OBJC_ARC) diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake index 0ad942f..193860c 100644 --- a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.15) -project(objcxxtest LANGUAGES CXX OBJCXX) +enable_language(CXX) +enable_language(OBJCXX) include(CheckOBJCXXCompilerFlag) check_objcxx_compiler_flag(-fobjc-arc HAVE_OBJC_ARC) diff --git a/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake b/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake index 3ca24af..5e66e82 100644 --- a/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeObjectLibsInTwoProjects.cmake @@ -1,5 +1 @@ -cmake_minimum_required (VERSION 3.19) - -project (test_xcode_fail NONE) - add_subdirectory(subproject_two_object_libs) diff --git a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake index 44052f0..80107cb 100644 --- a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required (VERSION 3.14) if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]") set(USE_SWIFT 1) diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake index 2fe5a9f..ff3419c 100644 --- a/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.7) - -project(XcodeSchemaGeneration CXX) +enable_language(CXX) add_executable(foo main.cpp) diff --git a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake index 267e379..05a8976 100644 --- a/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeSchemaProperty.cmake @@ -1,9 +1,7 @@ -cmake_minimum_required(VERSION 3.7) +enable_language(CXX) set(CMAKE_XCODE_GENERATE_SCHEME ON) -project(XcodeSchemaProperty CXX) - function(create_scheme_for_variable variable) set(CMAKE_XCODE_SCHEME_${variable} ON) add_executable(${variable} main.cpp) diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake index e83d7f3..55dd1a7 100644 --- a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake @@ -1,2 +1 @@ -cmake_minimum_required(VERSION 3.3) find_package(ZLIB REQUIRED) diff --git a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake index 58d2616..bd8995b 100644 --- a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake @@ -1,6 +1,4 @@ -cmake_minimum_required(VERSION 3.23) - -project(XcodeXCConfig C) +enable_language(C) set(CMAKE_XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.global.debug.xcconfig,XcodeXCConfig.global.release.xcconfig>") diff --git a/Tests/RunCMake/add_custom_command/CMakeLists.txt b/Tests/RunCMake/add_custom_command/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_custom_command/CMakeLists.txt +++ b/Tests/RunCMake/add_custom_command/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_custom_target/CMakeLists.txt b/Tests/RunCMake/add_custom_target/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_custom_target/CMakeLists.txt +++ b/Tests/RunCMake/add_custom_target/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_dependencies/CMakeLists.txt b/Tests/RunCMake/add_dependencies/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/add_dependencies/CMakeLists.txt +++ b/Tests/RunCMake/add_dependencies/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake b/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake index f0e4069..547c101 100644 --- a/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake +++ b/Tests/RunCMake/add_dependencies/ReadOnlyProperty.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.7) -project(ReadOnlyProperty C) +enable_language(C) add_library(a a.c) diff --git a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake index 45b3974..2f883af 100644 --- a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake +++ b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.7) -project(RetrieveDependencies C) +enable_language(C) add_library(a a.c) diff --git a/Tests/RunCMake/add_executable/CMakeLists.txt b/Tests/RunCMake/add_executable/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_executable/CMakeLists.txt +++ b/Tests/RunCMake/add_executable/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_library/CMakeLists.txt b/Tests/RunCMake/add_library/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/add_library/CMakeLists.txt +++ b/Tests/RunCMake/add_library/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_subdirectory/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMakeLists.txt index 47d249c..b5d7262 100644 --- a/Tests/RunCMake/add_subdirectory/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) # Have to set policy here due to policy scope if(DEFINED CMP0082_VALUE) diff --git a/Tests/RunCMake/alias_targets/CMakeLists.txt b/Tests/RunCMake/alias_targets/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/alias_targets/CMakeLists.txt +++ b/Tests/RunCMake/alias_targets/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/alias_targets/invalid-name.cmake b/Tests/RunCMake/alias_targets/invalid-name.cmake index 01983e5..e2ebbfa 100644 --- a/Tests/RunCMake/alias_targets/invalid-name.cmake +++ b/Tests/RunCMake/alias_targets/invalid-name.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_policy(SET CMP0037 OLD) enable_language(CXX) add_library(foo empty.cpp) diff --git a/Tests/RunCMake/build_command/CMakeLists.txt b/Tests/RunCMake/build_command/CMakeLists.txt index f1a83e8..1319aec 100644 --- a/Tests/RunCMake/build_command/CMakeLists.txt +++ b/Tests/RunCMake/build_command/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) if(NOT NoProject) project(${RunCMake_TEST} NONE) endif() diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt deleted file mode 100644 index 7d40dcb..0000000 --- a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt +++ /dev/null @@ -1,26 +0,0 @@ -^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -+ -CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -+ -CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. - - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt new file mode 100644 index 0000000..7981235 --- /dev/null +++ b/Tests/RunCMake/cmake_minimum_required/Before3_5-stderr.txt @@ -0,0 +1,26 @@ +^CMake Deprecation Warning at Before3_5\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at Before3_5\.cmake:2 \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Deprecation Warning at Before3_5\.cmake:6 \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake index 220e359..220e359 100644 --- a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake +++ b/Tests/RunCMake/cmake_minimum_required/Before3_5.cmake diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt index 667561e..8eb5748 100644 --- a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt +++ b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt index 81d26d2..3eb980a 100644 --- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt +++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt @@ -1,9 +1,9 @@ -^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. +^CMake Deprecation Warning at CompatBefore24\.cmake:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake index 3a959bb..36c44cb 100644 --- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake @@ -4,7 +4,7 @@ run_cmake(Before24) run_cmake(CompatBefore24) run_cmake(Future) run_cmake(PolicyBefore24) -run_cmake(Before2812) +run_cmake(Before3_5) run_cmake(Range) run_cmake(RangeBad) run_cmake(Unknown) diff --git a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt index 6dd8cdf..93ee9df 100644 --- a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt +++ b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/cmake_path/call-cmake_path.cmake b/Tests/RunCMake/cmake_path/call-cmake_path.cmake index 70fd6f5..655115f 100644 --- a/Tests/RunCMake/cmake_path/call-cmake_path.cmake +++ b/Tests/RunCMake/cmake_path/call-cmake_path.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.18...3.19) - # define input variable set (path "") diff --git a/Tests/RunCMake/configure_file/CMakeLists.txt b/Tests/RunCMake/configure_file/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/configure_file/CMakeLists.txt +++ b/Tests/RunCMake/configure_file/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/continue/CMakeLists.txt b/Tests/RunCMake/continue/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/continue/CMakeLists.txt +++ b/Tests/RunCMake/continue/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt index af70ac3..f5d57e9 100644 --- a/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt +++ b/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD-stderr.txt @@ -1,2 +1,9 @@ -^(Error\(s\) when building project +^CMake Deprecation Warning at [^ +]*/Tests/RunCMake/ctest_build/BuildFailure-CMP0061-OLD/test\.cmake:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++(Error\(s\) when building project )?ctest_build returned zero$ diff --git a/Tests/RunCMake/ctest_build/CMakeLists.txt.in b/Tests/RunCMake/ctest_build/CMakeLists.txt.in index 4a067fa..0a59940 100644 --- a/Tests/RunCMake/ctest_build/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_build/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_CMAKELISTS_PREFIX_CODE@ project(CTestBuild@CASE_NAME@ @LANG@) include(CTest) diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake index 6f1b4b6..12525f2 100644 --- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake @@ -35,7 +35,9 @@ endif() run_ctest(BuildFailure) if (RunCMake_GENERATOR MATCHES "Makefiles") - set(CASE_TEST_PREFIX_CODE "") + set(CASE_TEST_PREFIX_CODE [[ +cmake_policy(VERSION 3.2) +]]) run_ctest(BuildFailure-CMP0061-OLD) endif() endfunction() diff --git a/Tests/RunCMake/ctest_build/test.cmake.in b/Tests/RunCMake/ctest_build/test.cmake.in index 9f7fa13..f92568f 100644 --- a/Tests/RunCMake/ctest_build/test.cmake.in +++ b/Tests/RunCMake/ctest_build/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") diff --git a/Tests/RunCMake/ctest_cmake_error/test.cmake.in b/Tests/RunCMake/ctest_cmake_error/test.cmake.in index 0648e7c..711a77f 100644 --- a/Tests/RunCMake/ctest_cmake_error/test.cmake.in +++ b/Tests/RunCMake/ctest_cmake_error/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_configure/CMakeLists.txt.in b/Tests/RunCMake/ctest_configure/CMakeLists.txt.in index 2fb21d4..2860b5c 100644 --- a/Tests/RunCMake/ctest_configure/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_configure/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestConfigure@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_configure/test.cmake.in b/Tests/RunCMake/ctest_configure/test.cmake.in index 72d199a..5935809 100644 --- a/Tests/RunCMake/ctest_configure/test.cmake.in +++ b/Tests/RunCMake/ctest_configure/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in b/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in index 1babd72..da7ec1a 100644 --- a/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_coverage/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestCoverage@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_coverage/test.cmake.in b/Tests/RunCMake/ctest_coverage/test.cmake.in index 1788e66..f5a1223 100644 --- a/Tests/RunCMake/ctest_coverage/test.cmake.in +++ b/Tests/RunCMake/ctest_coverage/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in index 68a0fcb..1de338b 100644 --- a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(CTestTestMemcheck@CASE_NAME@ NONE) include(CTest) diff --git a/Tests/RunCMake/ctest_memcheck/test.cmake.in b/Tests/RunCMake/ctest_memcheck/test.cmake.in index eedf080..af995fc 100644 --- a/Tests/RunCMake/ctest_memcheck/test.cmake.in +++ b/Tests/RunCMake/ctest_memcheck/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_SITE "@SITE@") diff --git a/Tests/RunCMake/ctest_start/CMakeLists.txt.in b/Tests/RunCMake/ctest_start/CMakeLists.txt.in index 913239c..e497a7d 100644 --- a/Tests/RunCMake/ctest_start/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_start/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestStart@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in index 4063ece..82acc19 100644 --- a/Tests/RunCMake/ctest_start/test.cmake.in +++ b/Tests/RunCMake/ctest_start/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_submit/test.cmake.in b/Tests/RunCMake/ctest_submit/test.cmake.in index 35cd16a..0f4885f 100644 --- a/Tests/RunCMake/ctest_submit/test.cmake.in +++ b/Tests/RunCMake/ctest_submit/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/ctest_test/CMakeLists.txt.in b/Tests/RunCMake/ctest_test/CMakeLists.txt.in index e61b556..8eb422d 100644 --- a/Tests/RunCMake/ctest_test/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_test/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestTest@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_test/test.cmake.in b/Tests/RunCMake/ctest_test/test.cmake.in index 36b1dbd..16dde1c 100644 --- a/Tests/RunCMake/ctest_test/test.cmake.in +++ b/Tests/RunCMake/ctest_test/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") diff --git a/Tests/RunCMake/ctest_update/CMakeLists.txt.in b/Tests/RunCMake/ctest_update/CMakeLists.txt.in index ecf0e54..f816fac 100644 --- a/Tests/RunCMake/ctest_update/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_update/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestTest@CASE_NAME@ NONE) include(CTest) @CASE_CMAKELISTS_SUFFIX_CODE@ diff --git a/Tests/RunCMake/ctest_update/test.cmake.in b/Tests/RunCMake/ctest_update/test.cmake.in index 01aab26..faaf9b4 100644 --- a/Tests/RunCMake/ctest_update/test.cmake.in +++ b/Tests/RunCMake/ctest_update/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) @CASE_TEST_PREFIX_CODE@ set(CTEST_SITE "test-site") diff --git a/Tests/RunCMake/ctest_upload/CMakeLists.txt.in b/Tests/RunCMake/ctest_upload/CMakeLists.txt.in index 1fab71b..21e5273 100644 --- a/Tests/RunCMake/ctest_upload/CMakeLists.txt.in +++ b/Tests/RunCMake/ctest_upload/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(CTestUpload@CASE_NAME@ NONE) include(CTest) add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version) diff --git a/Tests/RunCMake/ctest_upload/test.cmake.in b/Tests/RunCMake/ctest_upload/test.cmake.in index f13bdd1..a546d38 100644 --- a/Tests/RunCMake/ctest_upload/test.cmake.in +++ b/Tests/RunCMake/ctest_upload/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) set(CTEST_SITE "test-site") set(CTEST_BUILD_NAME "test-build-name") diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/export/CMakeLists.txt +++ b/Tests/RunCMake/export/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake b/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake index 565f440..d757eea 100644 --- a/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake +++ b/Tests/RunCMake/file-DOWNLOAD/RunCMakeTest.cmake @@ -24,3 +24,8 @@ run_cmake(SHOW_PROGRESS) if(NOT CMake_TEST_NO_NETWORK) run_cmake(bad-hostname) endif() + +if(CMake_TEST_TLS_VERIFY_URL) + run_cmake(TLS_VERIFY-bad) + run_cmake_with_options(TLS_VERIFY-good -Durl=${CMake_TEST_TLS_VERIFY_URL}) +endif() diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt new file mode 100644 index 0000000..8f5d437 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad-stdout.txt @@ -0,0 +1 @@ +-- (60;"SSL peer certificate or SSH remote key was not OK"|35;"SSL connect error") diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake new file mode 100644 index 0000000..333f990 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-bad.cmake @@ -0,0 +1,6 @@ +file(DOWNLOAD https://expired.badssl.com TLS_VERIFY 1 STATUS status LOG log) +message(STATUS "${status}") +list(GET status 0 code) +if(NOT code MATCHES "^(35|60)$") + message("${log}") +endif() diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good-stdout.txt b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good-stdout.txt new file mode 100644 index 0000000..348bb17 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good-stdout.txt @@ -0,0 +1 @@ +-- 0;"No error" diff --git a/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good.cmake b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good.cmake new file mode 100644 index 0000000..279eb69 --- /dev/null +++ b/Tests/RunCMake/file-DOWNLOAD/TLS_VERIFY-good.cmake @@ -0,0 +1,6 @@ +file(DOWNLOAD ${url} TLS_VERIFY 1 STATUS status LOG log) +message(STATUS "${status}") +list(GET status 0 code) +if(NOT code EQUAL 0) + message("${log}") +endif() diff --git a/Tests/RunCMake/file/CMakeLists.txt b/Tests/RunCMake/file/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/file/CMakeLists.txt +++ b/Tests/RunCMake/file/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/find_dependency/CMakeLists.txt +++ b/Tests/RunCMake/find_dependency/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_file/CMakeLists.txt b/Tests/RunCMake/find_file/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/find_file/CMakeLists.txt +++ b/Tests/RunCMake/find_file/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_library/CMakeLists.txt b/Tests/RunCMake/find_library/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/find_library/CMakeLists.txt +++ b/Tests/RunCMake/find_library/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_package/CMakeLists.txt b/Tests/RunCMake/find_package/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/find_package/CMakeLists.txt +++ b/Tests/RunCMake/find_package/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_path/CMakeLists.txt b/Tests/RunCMake/find_path/CMakeLists.txt index ef2163c..93ee9df 100644 --- a/Tests/RunCMake/find_path/CMakeLists.txt +++ b/Tests/RunCMake/find_path/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_program/CMakeLists.txt b/Tests/RunCMake/find_program/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/find_program/CMakeLists.txt +++ b/Tests/RunCMake/find_program/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/get_filename_component/CMakeLists.txt b/Tests/RunCMake/get_filename_component/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/get_filename_component/CMakeLists.txt +++ b/Tests/RunCMake/get_filename_component/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/get_property/CMakeLists.txt b/Tests/RunCMake/get_property/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/get_property/CMakeLists.txt +++ b/Tests/RunCMake/get_property/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/if/CMakeLists.txt b/Tests/RunCMake/if/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/if/CMakeLists.txt +++ b/Tests/RunCMake/if/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/include_directories/CMakeLists.txt +++ b/Tests/RunCMake/include_directories/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/include_external_msproject/CMakeLists.txt b/Tests/RunCMake/include_external_msproject/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/include_external_msproject/CMakeLists.txt +++ b/Tests/RunCMake/include_external_msproject/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt index de0b70f..6b4c4b0 100644 --- a/Tests/RunCMake/install/CMP0062-OLD-stderr.txt +++ b/Tests/RunCMake/install/CMP0062-OLD-stderr.txt @@ -1,10 +1,19 @@ -^CMake Deprecation Warning at CMP0062-OLD.cmake:[0-9]+ \(cmake_policy\): +^CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Deprecation Warning at CMP0062-OLD\.cmake:[0-9]+ \(cmake_policy\): The OLD behavior for policy CMP0062 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\)$ + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/install/CMakeLists.txt b/Tests/RunCMake/install/CMakeLists.txt index 6dd8cdf..93ee9df 100644 --- a/Tests/RunCMake/install/CMakeLists.txt +++ b/Tests/RunCMake/install/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 477ffe0..fa61bdb 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.4) include(RunCMake) # Function to build and install a project. The latter step *-check.cmake diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt b/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt index 138a69d..7d1477f 100644 --- a/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache-stderr.txt @@ -1,11 +1,11 @@ ^CMake Warning \(dev\) at TARGETS-Defaults-Cache.cmake:[0-9]+ \(install\): Target lib3 has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning \(dev\) at TARGETS-Defaults-Cache.cmake:[0-9]+ \(install\): Target lib4 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt b/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt index 5f56986..5600801 100644 --- a/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-Defaults-stderr.txt @@ -1,11 +1,11 @@ ^CMake Warning \(dev\) at TARGETS-Defaults.cmake:[0-9]+ \(install\): Target lib3 has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. + CMake Warning \(dev\) at TARGETS-Defaults.cmake:[0-9]+ \(install\): Target lib4 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake index cba04b2..c72e405 100644 --- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake +++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-new_rpath.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.14) enable_language(C) # test matrix diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake index 43ae787..891b1ac 100644 --- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake +++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath.cmake @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.14) enable_language(C) add_library(utils SHARED obj1.c) diff --git a/Tests/RunCMake/install/TARGETS-RPATH.cmake b/Tests/RunCMake/install/TARGETS-RPATH.cmake index b75deff..3e182f8 100644 --- a/Tests/RunCMake/install/TARGETS-RPATH.cmake +++ b/Tests/RunCMake/install/TARGETS-RPATH.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.9) - +cmake_policy(SET CMP0068 NEW) enable_language(C) set(CMAKE_BUILD_WITH_INSTALL_RPATH 1) diff --git a/Tests/RunCMake/list/CMakeLists.txt b/Tests/RunCMake/list/CMakeLists.txt index 4b3de84..93ee9df 100644 --- a/Tests/RunCMake/list/CMakeLists.txt +++ b/Tests/RunCMake/list/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt index 9103bd2..5dd76f7 100644 --- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt +++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt @@ -1,13 +1,13 @@ -^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\): - Compatibility with CMake < 2.8.12 will be removed from a future version of - CMake. +^CMake Deprecation Warning at GET-CMP0007-WARN\.cmake:1 \(cmake_policy\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. - Update the VERSION argument <min> value or use a ...<max> suffix to tell - CMake that the project does not need compatibility with older versions. + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + -CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\): +CMake Warning \(dev\) at GET-CMP0007-WARN\.cmake:4 \(list\): Policy CMP0007 is not set: list command no longer ignores empty elements. Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy command to set the policy and suppress this warning. List has value = diff --git a/Tests/RunCMake/math/CMakeLists.txt b/Tests/RunCMake/math/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/math/CMakeLists.txt +++ b/Tests/RunCMake/math/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/message/CMakeLists.txt b/Tests/RunCMake/message/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/message/CMakeLists.txt +++ b/Tests/RunCMake/message/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/message/warnmessage-rootdir.cmake b/Tests/RunCMake/message/warnmessage-rootdir.cmake index f82efb9..f400079 100644 --- a/Tests/RunCMake/message/warnmessage-rootdir.cmake +++ b/Tests/RunCMake/message/warnmessage-rootdir.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.15) - # Generating the backtrace for this warning message used to trigger a # spurious assertion when the current directory is the root directory message(WARNING "We expect to see this warning message") diff --git a/Tests/RunCMake/no_install_prefix/CMakeLists.txt b/Tests/RunCMake/no_install_prefix/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/no_install_prefix/CMakeLists.txt +++ b/Tests/RunCMake/no_install_prefix/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/project/CMP0048-NEW-stderr.txt b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt new file mode 100644 index 0000000..ad75f43 --- /dev/null +++ b/Tests/RunCMake/project/CMP0048-NEW-stderr.txt @@ -0,0 +1,6 @@ +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\.$ diff --git a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt index 695fb70..376249b 100644 --- a/Tests/RunCMake/project/CMP0048-OLD-stderr.txt +++ b/Tests/RunCMake/project/CMP0048-OLD-stderr.txt @@ -1,6 +1,13 @@ -^CMake Deprecation Warning at CMP0048-OLD.cmake:1 \(cmake_policy\): +^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\. ++ +CMake Deprecation Warning at CMP0048-OLD\.cmake:1 \(cmake_policy\): The OLD behavior for policy CMP0048 will be removed from a future version - of CMake. + of CMake\. The cmake-policies\(7\) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under diff --git a/Tests/RunCMake/project/CMakeLists.txt b/Tests/RunCMake/project/CMakeLists.txt index fdcaee9..a0ee6d7 100644 --- a/Tests/RunCMake/project/CMakeLists.txt +++ b/Tests/RunCMake/project/CMakeLists.txt @@ -1,5 +1,9 @@ -if(NOT "x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired") +if("x${RunCMake_TEST}" STREQUAL "xNoMinimumRequired") + # No cmake_minimum_required(VERSION) +elseif(RunCMake_TEST MATCHES "^CMP0048") cmake_minimum_required(VERSION 2.8.12) +else() + cmake_minimum_required(VERSION 3.5) endif() project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt index fc1a02b..c72534f 100644 --- a/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt +++ b/Tests/RunCMake/project_injected/CMP0048-WARN-stderr.txt @@ -1,4 +1,4 @@ -^CMake Warning \(dev\) in CMakeLists.txt: +^CMake Warning \(dev\) in CMakeLists\.txt: No project\(\) command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project\(\) command. Add a line of code such as @@ -8,5 +8,12 @@ near the top of the file, but after cmake_minimum_required\(\). CMake is pretending there is a "project\(Project\)" command on the first - line. -This warning is for project developers. Use -Wno-dev to suppress it.$ + line\. +This warning is for project developers. Use -Wno-dev to suppress it\. ++ +CMake Deprecation Warning at CMakeLists\.txt:1 \(cmake_minimum_required\): + Compatibility with CMake < 3\.5 will be removed from a future version of + CMake\. + + Update the VERSION argument <min> value or use a \.\.\.<max> suffix to tell + CMake that the project does not need compatibility with older versions\.$ diff --git a/Tests/RunCMake/separate_arguments/CMakeLists.txt b/Tests/RunCMake/separate_arguments/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/separate_arguments/CMakeLists.txt +++ b/Tests/RunCMake/separate_arguments/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/set/CMakeLists.txt b/Tests/RunCMake/set/CMakeLists.txt index 4b3de84..93ee9df 100644 --- a/Tests/RunCMake/set/CMakeLists.txt +++ b/Tests/RunCMake/set/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/set/ParentPulling.cmake b/Tests/RunCMake/set/ParentPulling.cmake index 2614533..5649cb2 100644 --- a/Tests/RunCMake/set/ParentPulling.cmake +++ b/Tests/RunCMake/set/ParentPulling.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.0) -project(Minimal NONE) - function(test_set) set(blah "value2") message("before PARENT_SCOPE blah=${blah}") diff --git a/Tests/RunCMake/set/ParentPullingRecursive.cmake b/Tests/RunCMake/set/ParentPullingRecursive.cmake index a3e29f5..4d50561 100644 --- a/Tests/RunCMake/set/ParentPullingRecursive.cmake +++ b/Tests/RunCMake/set/ParentPullingRecursive.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required(VERSION 3.0) -project(Minimal NONE) - function(report where) message("----------") message("variable values at ${where}:") diff --git a/Tests/RunCMake/set_property/CMakeLists.txt b/Tests/RunCMake/set_property/CMakeLists.txt index 18dfd26..93ee9df 100644 --- a/Tests/RunCMake/set_property/CMakeLists.txt +++ b/Tests/RunCMake/set_property/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/string/CMakeLists.txt b/Tests/RunCMake/string/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/string/CMakeLists.txt +++ b/Tests/RunCMake/string/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/string/RegexClear.cmake b/Tests/RunCMake/string/RegexClear.cmake index d5edaac..4abe25e 100644 --- a/Tests/RunCMake/string/RegexClear.cmake +++ b/Tests/RunCMake/string/RegexClear.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required (VERSION 3.0) -project (RegexClear C) - function (output_results msg) message("results from: ${msg}") message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") diff --git a/Tests/RunCMake/string/RegexMultiMatchClear.cmake b/Tests/RunCMake/string/RegexMultiMatchClear.cmake index 80b6b3c..788ba5e 100644 --- a/Tests/RunCMake/string/RegexMultiMatchClear.cmake +++ b/Tests/RunCMake/string/RegexMultiMatchClear.cmake @@ -1,6 +1,3 @@ -cmake_minimum_required (VERSION 3.0) -project (RegexClear NONE) - function (output_results msg) message("results from: ${msg}") message("CMAKE_MATCH_0: -->${CMAKE_MATCH_0}<--") diff --git a/Tests/RunCMake/target_compile_features/CMakeLists.txt b/Tests/RunCMake/target_compile_features/CMakeLists.txt index 2897109..93ee9df 100644 --- a/Tests/RunCMake/target_compile_features/CMakeLists.txt +++ b/Tests/RunCMake/target_compile_features/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake b/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake index 316b74b..4a0f068 100644 --- a/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake +++ b/Tests/RunCMake/target_link_libraries-ALIAS/AliasTargets.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.16...3.17) - enable_language(C) add_library (func SHARED func.c) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake b/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake index 22d3df7..6610d40 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LANGUAGE/genex.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.16...3.17) - enable_language(C) enable_language(CXX) diff --git a/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake b/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake index 9feccd0..e2bd669 100644 --- a/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake +++ b/Tests/RunCMake/target_link_libraries-LINK_LANG_AND_ID/genex.cmake @@ -1,6 +1,3 @@ - -cmake_minimum_required(VERSION 3.16...3.17) - enable_language(C) enable_language(CXX) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake index 6c72546..a5bf2fb 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_policy(VERSION 2.8.11) project(CMP0022-WARN) add_library(foo SHARED empty_vs6_1.cpp) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake index dfdf70b..d6f34a1 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_policy(VERSION 2.8.11) project(CMP0022-WARN) add_library(foo SHARED empty_vs6_1.cpp) diff --git a/Tests/RunCMake/target_link_libraries/CMakeLists.txt b/Tests/RunCMake/target_link_libraries/CMakeLists.txt index 667561e..8eb5748 100644 --- a/Tests/RunCMake/target_link_libraries/CMakeLists.txt +++ b/Tests/RunCMake/target_link_libraries/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake index 189592d..7c5d77d 100644 --- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake @@ -1,4 +1,5 @@ include(RunCMake) +set(RunCMake_IGNORE_POLICY_VERSION_DEPRECATION ON) if(RunCMake_GENERATOR_IS_MULTI_CONFIG) set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug) diff --git a/Tests/RunCMake/target_sources/CMP0076-WARN.cmake b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake index 2e07331..20f1d5e 100644 --- a/Tests/RunCMake/target_sources/CMP0076-WARN.cmake +++ b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - add_library(publiclib) add_subdirectory(CMP0076-WARN) diff --git a/Tests/RunCMake/target_sources/OriginDebug-stderr.txt b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt index 502d5f1..fd797cf 100644 --- a/Tests/RunCMake/target_sources/OriginDebug-stderr.txt +++ b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt @@ -1,4 +1,4 @@ -CMake Debug Log at OriginDebug.cmake:13 \(add_library\): +CMake Debug Log at OriginDebug\.cmake:10 \(add_library\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_2.cpp @@ -6,7 +6,7 @@ CMake Debug Log at OriginDebug.cmake:13 \(add_library\): Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) .* -CMake Debug Log at OriginDebug.cmake:16 \(set_property\): +CMake Debug Log at OriginDebug\.cmake:13 \(set_property\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_3.cpp @@ -14,7 +14,7 @@ CMake Debug Log at OriginDebug.cmake:16 \(set_property\): Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) .* -CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): +CMake Debug Log at OriginDebug\.cmake:17 \(target_sources\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_4.cpp @@ -22,7 +22,7 @@ CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): Call Stack \(most recent call first\): CMakeLists\.txt:[0-9]+ \(include\) .* -CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): +CMake Debug Log at OriginDebug\.cmake:11 \(target_link_libraries\): Used sources for target OriginDebug: \* .*Tests/RunCMake/target_sources/empty_1.cpp diff --git a/Tests/RunCMake/target_sources/OriginDebug.cmake b/Tests/RunCMake/target_sources/OriginDebug.cmake index d40a1d8..e2d8477 100644 --- a/Tests/RunCMake/target_sources/OriginDebug.cmake +++ b/Tests/RunCMake/target_sources/OriginDebug.cmake @@ -1,7 +1,4 @@ - -cmake_minimum_required(VERSION 3.0) - -project(OriginDebug) +enable_language(CXX) set(CMAKE_DEBUG_TARGET_PROPERTIES SOURCES) diff --git a/Tests/RunCMake/try_compile/CMP0056.cmake b/Tests/RunCMake/try_compile/CMP0056.cmake index 2ab79d5..634576e 100644 --- a/Tests/RunCMake/try_compile/CMP0056.cmake +++ b/Tests/RunCMake/try_compile/CMP0056.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_policy(VERSION 3.1) enable_language(C) set(obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) diff --git a/Tests/RunCMake/try_compile/CMakeLists.txt b/Tests/RunCMake/try_compile/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/try_compile/CMakeLists.txt +++ b/Tests/RunCMake/try_compile/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/try_run/CMakeLists.txt b/Tests/RunCMake/try_run/CMakeLists.txt index e93f0b6..e6c41a5 100644 --- a/Tests/RunCMake/try_run/CMakeLists.txt +++ b/Tests/RunCMake/try_run/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} C) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/variable_watch/CMakeLists.txt b/Tests/RunCMake/variable_watch/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/variable_watch/CMakeLists.txt +++ b/Tests/RunCMake/variable_watch/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/while/CMakeLists.txt b/Tests/RunCMake/while/CMakeLists.txt index 74b3ff8..93ee9df 100644 --- a/Tests/RunCMake/while/CMakeLists.txt +++ b/Tests/RunCMake/while/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) |