diff options
362 files changed, 641 insertions, 675 deletions
diff --git a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake index 808f91d..7407959 100644 --- a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake +++ b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake @@ -74,6 +74,7 @@ set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "") set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") set(CMake_TEST_Qt5 "ON" CACHE BOOL "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_debian10_ninja.cmake b/.gitlab/ci/configure_debian10_ninja.cmake index acada17..e8d6d55 100644 --- a/.gitlab/ci/configure_debian10_ninja.cmake +++ b/.gitlab/ci/configure_debian10_ninja.cmake @@ -80,6 +80,7 @@ set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "") set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") set(CMake_TEST_Qt5 "ON" CACHE BOOL "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") if (NOT "$ENV{SWIFTC}" STREQUAL "") diff --git a/.gitlab/ci/configure_fedora37_makefiles.cmake b/.gitlab/ci/configure_fedora37_makefiles.cmake index 6cd3d35..725cc46 100644 --- a/.gitlab/ci/configure_fedora37_makefiles.cmake +++ b/.gitlab/ci/configure_fedora37_makefiles.cmake @@ -80,6 +80,7 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() set(CMake_TEST_Qt5 "ON" CACHE BOOL "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora37_ninja.cmake b/.gitlab/ci/configure_fedora37_ninja.cmake index 3defa5a..5b40677 100644 --- a/.gitlab/ci/configure_fedora37_ninja.cmake +++ b/.gitlab/ci/configure_fedora37_ninja.cmake @@ -2,6 +2,7 @@ set(CMake_TEST_GUI "ON" CACHE BOOL "") if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") # "Release" flags without "-DNDEBUG" so we get assertions. set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "") diff --git a/.gitlab/ci/configure_macos_arm64_ninja.cmake b/.gitlab/ci/configure_macos_arm64_ninja.cmake index 1a41bc3..f59b43c 100644 --- a/.gitlab/ci/configure_macos_arm64_ninja.cmake +++ b/.gitlab/ci/configure_macos_arm64_ninja.cmake @@ -2,5 +2,6 @@ set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") set(CMake_TEST_GUI "ON" CACHE BOOL "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_x86_64_makefiles.cmake b/.gitlab/ci/configure_macos_x86_64_makefiles.cmake index 113fe56..3c5d8fe 100644 --- a/.gitlab/ci/configure_macos_x86_64_makefiles.cmake +++ b/.gitlab/ci/configure_macos_x86_64_makefiles.cmake @@ -5,6 +5,7 @@ set(CMake_TEST_GUI "ON" CACHE BOOL "") if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_x86_64_ninja.cmake b/.gitlab/ci/configure_macos_x86_64_ninja.cmake index 113fe56..3c5d8fe 100644 --- a/.gitlab/ci/configure_macos_x86_64_ninja.cmake +++ b/.gitlab/ci/configure_macos_x86_64_ninja.cmake @@ -5,6 +5,7 @@ set(CMake_TEST_GUI "ON" CACHE BOOL "") if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake b/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake index 722e009..a12ee6c 100644 --- a/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake +++ b/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake @@ -1,5 +1,6 @@ # Qt host tools are not yet available natively on windows-arm64. set(CMake_TEST_GUI "OFF" CACHE BOOL "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") set(BUILD_QtDialog "OFF" CACHE BOOL "") set(CMAKE_PREFIX_PATH "" CACHE STRING "") diff --git a/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake b/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake index f5a6d80..5bf0be8 100644 --- a/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake +++ b/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake @@ -1,6 +1,7 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common_ninja.cmake") diff --git a/.gitlab/ci/configure_windows_vs_common.cmake b/.gitlab/ci/configure_windows_vs_common.cmake index 962f03d..daf9aaa 100644 --- a/.gitlab/ci/configure_windows_vs_common.cmake +++ b/.gitlab/ci/configure_windows_vs_common.cmake @@ -4,6 +4,7 @@ set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_Fortran "OFF" CACHE BOOL "") +set(CMake_TEST_FindPatch "ON" CACHE BOOL "") set(CMake_TEST_Java OFF CACHE BOOL "") set(CMake_TEST_MFC "ON" CACHE BOOL "") diff --git a/.gitlab/ci/configure_windows_vs_common_ninja.cmake b/.gitlab/ci/configure_windows_vs_common_ninja.cmake index 1ae1a66..9f7acc3 100644 --- a/.gitlab/ci/configure_windows_vs_common_ninja.cmake +++ b/.gitlab/ci/configure_windows_vs_common_ninja.cmake @@ -6,6 +6,7 @@ set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_Fortran "OFF" CACHE BOOL "") +set(CMake_TEST_FindPatch "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") set(CMake_TEST_MFC "ON" CACHE BOOL "") diff --git a/Help/manual/cmake-configure-log.7.rst b/Help/manual/cmake-configure-log.7.rst index 72d4093..4d64506 100644 --- a/Help/manual/cmake-configure-log.7.rst +++ b/Help/manual/cmake-configure-log.7.rst @@ -12,18 +12,24 @@ cmake-configure-log(7) Introduction ============ -CMake writes a running log, known as the configure log, -of certain events that occur during the "configure" step. -The log file is located at:: - - ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml - +CMake writes a running log, known as the *configure log*, +of certain events that occur during the Configure step. The configure log does *not* contain a log of all output, errors, or messages printed while configuring a project. It is a log of detailed information about specific events, such as toolchain inspection by :command:`try_compile`, meant for use in debugging the configuration of a build tree. +For human use, this version of CMake writes the configure log to the file:: + + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml + +However, the *location and name of the log file may change* in future +versions of CMake. Tools that read the configure log should get its +location using a :ref:`configureLog <file-api configureLog>` query to +the :manual:`cmake-file-api(7)`. +See the `Log Versioning`_ section below for details. + Log Structure ============= diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst index cdb860f..367b0a7 100644 --- a/Help/manual/cmake-gui.1.rst +++ b/Help/manual/cmake-gui.1.rst @@ -11,7 +11,7 @@ Synopsis cmake-gui [<options>] cmake-gui [<options>] <path-to-source | path-to-existing-build> cmake-gui [<options>] -S <path-to-source> -B <path-to-build> - cmake-gui [<options>] --browse-manual + cmake-gui [<options>] --browse-manual [<filename>] Description =========== @@ -46,9 +46,11 @@ Options Name of the preset to use from the project's :manual:`presets <cmake-presets(7)>` files, if it has them. -.. option:: --browse-manual +.. option:: --browse-manual [<filename>] - Open the CMake reference manual in a browser and immediately exit. + Open the CMake reference manual in a browser and immediately exit. If + ``<filename>`` is specified, open that file within the reference manual + instead of ``index.html``. .. include:: OPTIONS_HELP.txt diff --git a/Help/prop_tgt/LANG_CLANG_TIDY_EXPORT_FIXES_DIR.rst b/Help/prop_tgt/LANG_CLANG_TIDY_EXPORT_FIXES_DIR.rst index 265fade..fc88f0f 100644 --- a/Help/prop_tgt/LANG_CLANG_TIDY_EXPORT_FIXES_DIR.rst +++ b/Help/prop_tgt/LANG_CLANG_TIDY_EXPORT_FIXES_DIR.rst @@ -17,12 +17,12 @@ absolute directory, it is assumed to be relative to the target's binary directory. This property should be preferred over adding an ``--export-fixes`` or ``--fix`` argument directly to the :prop_tgt:`<LANG>_CLANG_TIDY` property. -At generate-time, in order to avoid passing stale fixes from old code to -``clang-apply-replacements``, CMake will search the directory for any ``.yaml`` -files that won't be generated by ``clang-tidy`` during the build, and delete -them. In addition, just before running ``clang-tidy`` on a file, CMake will -delete that file's corresponding ``.yaml`` file in case ``clang-tidy`` doesn't -produce any fixes. +When this property is set, CMake takes ownership of the specified directory, +and may create, modify, or delete files and directories within the directory +at any time during configure or build time. Users should use a dedicated +directory for exporting clang-tidy fixes to avoid having files deleted or +overwritten by CMake. Users should not create, modify, or delete files in this +directory. This property is initialized by the value of the :variable:`CMAKE_<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR` variable if it is set diff --git a/Help/release/dev/deprecate-policy-old.rst b/Help/release/dev/deprecate-policy-old.rst new file mode 100644 index 0000000..9c38866 --- /dev/null +++ b/Help/release/dev/deprecate-policy-old.rst @@ -0,0 +1,7 @@ +deprecate-policy-old +-------------------- + +* Compatibility with versions of CMake older than 3.5 is now deprecated + and will be removed from a future version. Calls to + :command:`cmake_minimum_required` or :command:`cmake_policy` that set + the policy version to an older value now issue a deprecation diagnostic. diff --git a/Modules/Compiler/LCC-C-DetermineCompiler.cmake b/Modules/Compiler/LCC-C-DetermineCompiler.cmake index 2ce92fe..3f46210 100644 --- a/Modules/Compiler/LCC-C-DetermineCompiler.cmake +++ b/Modules/Compiler/LCC-C-DetermineCompiler.cmake @@ -2,10 +2,8 @@ set(_compiler_id_pp_test "defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))") set(_compiler_id_version_compute " -# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(1) -# if defined(__LCC__) -# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__LCC__- 100) -# endif +# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__LCC__ / 100) +# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__LCC__ % 100) # if defined(__LCC_MINOR__) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__LCC_MINOR__) # endif diff --git a/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake b/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake index 2ce92fe..3f46210 100644 --- a/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake +++ b/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake @@ -2,10 +2,8 @@ set(_compiler_id_pp_test "defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))") set(_compiler_id_version_compute " -# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(1) -# if defined(__LCC__) -# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__LCC__- 100) -# endif +# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__LCC__ / 100) +# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__LCC__ % 100) # if defined(__LCC_MINOR__) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__LCC_MINOR__) # endif diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1b77599..e48f32f 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 26) -set(CMake_VERSION_PATCH 20230209) +set(CMake_VERSION_PATCH 20230214) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 50e8e3a..21ed8c8 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -34,7 +34,7 @@ const cmDocumentationEntry cmDocumentationUsage = { " cmake-gui [options] <path-to-source>\n" " cmake-gui [options] <path-to-existing-build>\n" " cmake-gui [options] -S <path-to-source> -B <path-to-build>\n" - " cmake-gui [options] --browse-manual" + " cmake-gui [options] --browse-manual [<filename>]" }; const cmDocumentationEntry cmDocumentationOptions[3] = { @@ -62,7 +62,7 @@ Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin); int CMakeGUIExec(CMakeSetupDialog* window); void SetupDefaultQSettings(); -void OpenReferenceManual(); +void OpenReferenceManual(const QString& filename); int main(int argc, char** argv) { @@ -199,7 +199,12 @@ int main(int argc, char** argv) } presetName = preset.toStdString(); } else if (arg == "--browse-manual") { - OpenReferenceManual(); + ++i; + if (i >= args.size()) { + OpenReferenceManual("index.html"); + } else { + OpenReferenceManual(args[i]); + } return 0; } } diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 3d4d726..8641407 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -42,7 +42,7 @@ #include "RegexExplorer.h" #include "WarningMessagesDialog.h" -void OpenReferenceManual() +void OpenReferenceManual(const QString& filename) { QString urlFormat("https://cmake.org/cmake/help/v%1.%2/"); QUrl url(urlFormat.arg(QString::number(cmVersion::GetMajorVersion()), @@ -51,7 +51,7 @@ void OpenReferenceManual() if (!cmSystemTools::GetHTMLDoc().empty()) { url = QUrl::fromLocalFile( QDir(QString::fromStdString(cmSystemTools::GetHTMLDoc())) - .filePath("index.html")); + .filePath(filename)); } QDesktopServices::openUrl(url); @@ -212,7 +212,8 @@ CMakeSetupDialog::CMakeSetupDialog() QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doHelp); a->setShortcut(QKeySequence::HelpContents); a = HelpMenu->addAction(tr("CMake Reference Manual")); - QObject::connect(a, &QAction::triggered, this, OpenReferenceManual); + QObject::connect(a, &QAction::triggered, this, + [] { OpenReferenceManual("index.html"); }); a = HelpMenu->addAction(tr("About")); QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doAbout); diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 0d0b513..0020690 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -282,9 +282,8 @@ std::string cmExtraKateGenerator::GenerateFilesString( cmMakefile* makefile = lgen->GetMakefile(); const std::vector<std::string>& listFiles = makefile->GetListFiles(); for (std::string const& listFile : listFiles) { - tmp = listFile; - { - files.insert(tmp); + if (listFile.find("/CMakeFiles/") == std::string::npos) { + files.insert(listFile); } } diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index da5f5e5..d5e5725 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -259,8 +259,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, { // Warn about policy versions for which support will be removed. if (warnCompat == WarnCompat::On && - (majorVer < 2 || (majorVer == 2 && minorVer < 8) || - (majorVer == 2 && minorVer == 8 && patchVer < 12)) && + (majorVer < 3 || (majorVer == 3 && minorVer < 5)) && // Avoid warning on calls generated by install(EXPORT) // in CMake versions prior to 3.18. !(majorVer == 2 && minorVer == 6 && patchVer == 0 && @@ -269,7 +268,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, "cmake_policy") == 0)) { mf->IssueMessage( MessageType::DEPRECATION_WARNING, - "Compatibility with CMake < 2.8.12 will be removed from " + "Compatibility with CMake < 3.5 will be removed from " "a future version of CMake.\n" "Update the VERSION argument <min> value or use a ...<max> suffix " "to tell CMake that the project does not need compatibility with " diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index c8ce900..2defc6c 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -631,7 +631,7 @@ endif() # selected components. Initialize with required components. set(KWSYS_CLASSES) set(KWSYS_H_FILES Configure) -set(KWSYS_HXX_FILES Configure String) +set(KWSYS_HXX_FILES Configure) # Add selected C++ classes. set(cppclasses diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx index ccd5f6d..50171dd 100644 --- a/Source/kwsys/CommandLineArguments.cxx +++ b/Source/kwsys/CommandLineArguments.cxx @@ -4,20 +4,19 @@ #include KWSYS_HEADER(CommandLineArguments.hxx) #include KWSYS_HEADER(Configure.hxx) -#include KWSYS_HEADER(String.hxx) // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. #if 0 # include "CommandLineArguments.hxx.in" # include "Configure.hxx.in" -# include "String.hxx.in" #endif #include <iostream> #include <map> #include <set> #include <sstream> +#include <string> #include <vector> #include <cstdio> @@ -52,14 +51,14 @@ struct CommandLineArgumentsCallbackStructure const char* Help; }; -class CommandLineArgumentsVectorOfStrings : public std::vector<kwsys::String> +class CommandLineArgumentsVectorOfStrings : public std::vector<std::string> { }; -class CommandLineArgumentsSetOfStrings : public std::set<kwsys::String> +class CommandLineArgumentsSetOfStrings : public std::set<std::string> { }; class CommandLineArgumentsMapOfStrucs - : public std::map<kwsys::String, CommandLineArgumentsCallbackStructure> + : public std::map<std::string, CommandLineArgumentsCallbackStructure> { }; @@ -70,7 +69,7 @@ public: using VectorOfStrings = CommandLineArgumentsVectorOfStrings; using CallbacksMap = CommandLineArgumentsMapOfStrucs; - using String = kwsys::String; + using String = std::string; using SetOfStrings = CommandLineArgumentsSetOfStrings; VectorOfStrings Argv; @@ -306,7 +305,7 @@ void CommandLineArguments::GetUnusedArguments(int* argc, char*** argv) // Copy everything after the LastArgument, since that was not parsed. for (cc = 0; cc < this->Internals->UnusedArguments.size(); cc++) { - kwsys::String& str = this->Internals->UnusedArguments[cc]; + std::string& str = this->Internals->UnusedArguments[cc]; args[cnt] = new char[str.size() + 1]; strcpy(args[cnt], str.c_str()); cnt++; diff --git a/Source/kwsys/String.hxx.in b/Source/kwsys/String.hxx.in deleted file mode 100644 index c36f4ce..0000000 --- a/Source/kwsys/String.hxx.in +++ /dev/null @@ -1,57 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing#kwsys for details. */ -#ifndef @KWSYS_NAMESPACE@_String_hxx -#define @KWSYS_NAMESPACE@_String_hxx - -#include <string> - -namespace @KWSYS_NAMESPACE@ { - -/** \class String - * \brief Short-name version of the STL basic_string class template. - * - * The standard library "string" type is actually a typedef for - * "basic_string<..long argument list..>". This string class is - * simply a subclass of this type with the same interface so that the - * name is shorter in debugging symbols and error messages. - */ -class String : public std::string -{ - /** The original string type. */ - typedef std::string stl_string; - -public: - /** String member types. */ - typedef stl_string::value_type value_type; - typedef stl_string::pointer pointer; - typedef stl_string::reference reference; - typedef stl_string::const_reference const_reference; - typedef stl_string::size_type size_type; - typedef stl_string::difference_type difference_type; - typedef stl_string::iterator iterator; - typedef stl_string::const_iterator const_iterator; - typedef stl_string::reverse_iterator reverse_iterator; - typedef stl_string::const_reverse_iterator const_reverse_iterator; - - /** String constructors. */ - String() - : stl_string() - { - } - String(const value_type* s) - : stl_string(s) - { - } - String(const value_type* s, size_type n) - : stl_string(s, n) - { - } - String(const stl_string& s, size_type pos = 0, size_type n = npos) - : stl_string(s, pos, n) - { - } -}; // End Class: String - -} // namespace @KWSYS_NAMESPACE@ - -#endif diff --git a/Tests/CMakeTests/EndStuffTestScript.cmake b/Tests/CMakeTests/EndStuffTestScript.cmake index e0d826d..bd89246 100644 --- a/Tests/CMakeTests/EndStuffTestScript.cmake +++ b/Tests/CMakeTests/EndStuffTestScript.cmake @@ -22,7 +22,7 @@ elseif(testname STREQUAL bad_endfunction) # fail do_end("endfunction()\n") elseif(testname STREQUAL bad_endif) # fail - do_end("cmake_minimum_required(VERSION 2.8.12)\nendif()\n") + do_end("cmake_minimum_required(VERSION 3.5)\nendif()\n") elseif(testname STREQUAL endif_low_min_version) # fail do_end("cmake_minimum_required(VERSION 1.2)\nendif()\n") diff --git a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt index ce6fac4..79e968a 100644 --- a/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt +++ b/Tests/CTestCoverageCollectGCOV/TestProject/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.5) project(TestProject CXX) diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in b/Tests/CTestCoverageCollectGCOV/test.cmake.in index 7c7a3e5..aaf3070 100644 --- a/Tests/CTestCoverageCollectGCOV/test.cmake.in +++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestCoverageCollectGCOV/TestProject") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestCoverageCollectGCOV/TestProject") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") diff --git a/Tests/CTestTest2/test.cmake.in b/Tests/CTestTest2/test.cmake.in index d5d4d2f..4f4f6cf 100644 --- a/Tests/CTestTest2/test.cmake.in +++ b/Tests/CTestTest2/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in index dd180f0..e46f71b 100644 --- a/Tests/CTestTestBadExe/test.cmake.in +++ b/Tests/CTestTestBadExe/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestBadGenerator/test.cmake.in b/Tests/CTestTestBadGenerator/test.cmake.in index ae6d0b5..34003b4 100644 --- a/Tests/CTestTestBadGenerator/test.cmake.in +++ b/Tests/CTestTestBadGenerator/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in index 3bac0e0..916bbbb 100644 --- a/Tests/CTestTestChecksum/test.cmake.in +++ b/Tests/CTestTestChecksum/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in index 1c46d4c..0df9f37 100644 --- a/Tests/CTestTestCostSerial/test.cmake.in +++ b/Tests/CTestTestCostSerial/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in index 916d4e9..34c9f3e 100644 --- a/Tests/CTestTestCrash/test.cmake.in +++ b/Tests/CTestTestCrash/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in index 507d46b..78b0ebb 100644 --- a/Tests/CTestTestCycle/test.cmake.in +++ b/Tests/CTestTestCycle/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in index 11bc92a..ea01297 100644 --- a/Tests/CTestTestDepends/test.cmake.in +++ b/Tests/CTestTestDepends/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in index 8eb808f..3aed1ab 100644 --- a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in +++ b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) set(CTEST_RUN_CURRENT_SCRIPT 0) diff --git a/Tests/CTestTestFdSetSize/test.cmake.in b/Tests/CTestTestFdSetSize/test.cmake.in index bfe4459..73b2cfa 100644 --- a/Tests/CTestTestFdSetSize/test.cmake.in +++ b/Tests/CTestTestFdSetSize/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.10) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestLaunchers/test.cmake.in b/Tests/CTestTestLaunchers/test.cmake.in index 2db1ddd..c3edfd5 100644 --- a/Tests/CTestTestLaunchers/test.cmake.in +++ b/Tests/CTestTestLaunchers/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) set(TEST_SUCCESS TRUE) diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in index 517db72..d60d16f 100644 --- a/Tests/CTestTestParallel/test.cmake.in +++ b/Tests/CTestTestParallel/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in index 826226d..dab26fc 100644 --- a/Tests/CTestTestResourceLock/test.cmake.in +++ b/Tests/CTestTestResourceLock/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in index 5dcfb63..3b03a7c 100644 --- a/Tests/CTestTestScheduler/test.cmake.in +++ b/Tests/CTestTestScheduler/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestSkipReturnCode/test.cmake.in b/Tests/CTestTestSkipReturnCode/test.cmake.in index 2988d2f..b45e4a6 100644 --- a/Tests/CTestTestSkipReturnCode/test.cmake.in +++ b/Tests/CTestTestSkipReturnCode/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestStopTime/GetDate.cmake b/Tests/CTestTestStopTime/GetDate.cmake index 64a4fb9..f8e40fc 100644 --- a/Tests/CTestTestStopTime/GetDate.cmake +++ b/Tests/CTestTestStopTime/GetDate.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.5) macro(GET_DATE) # diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index 3797d40..2d69f1d 100644 --- a/Tests/CTestTestStopTime/test.cmake.in +++ b/Tests/CTestTestStopTime/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in index 3b1fb5f..8b8d85e 100644 --- a/Tests/CTestTestSubdir/test.cmake.in +++ b/Tests/CTestTestSubdir/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in index ce9c497..9d9e430 100644 --- a/Tests/CTestTestTimeout/test.cmake.in +++ b/Tests/CTestTestTimeout/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in index 74fd1ec..db428e9 100644 --- a/Tests/CTestTestUpload/test.cmake.in +++ b/Tests/CTestTestUpload/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestVerboseOutput/test.cmake.in b/Tests/CTestTestVerboseOutput/test.cmake.in index 9c9a4dc..b47383a 100644 --- a/Tests/CTestTestVerboseOutput/test.cmake.in +++ b/Tests/CTestTestVerboseOutput/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in index 50dbba0..e0dbbc6 100644 --- a/Tests/CTestTestZeroTimeout/test.cmake.in +++ b/Tests/CTestTestZeroTimeout/test.cmake.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) # Settings: set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") diff --git a/Tests/CheckFortran.cmake b/Tests/CheckFortran.cmake index 1e943a1..850406b 100644 --- a/Tests/CheckFortran.cmake +++ b/Tests/CheckFortran.cmake @@ -7,7 +7,7 @@ if(NOT DEFINED CMAKE_Fortran_COMPILER) message(STATUS ${_desc}) file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CheckFortran/CMakeLists.txt" - "cmake_minimum_required(VERSION 2.8.12) + "cmake_minimum_required(VERSION 3.5) project(CheckFortran Fortran) file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" \"set(CMAKE_Fortran_COMPILER \\\"\${CMAKE_Fortran_COMPILER}\\\")\\n\" diff --git a/Tests/CustomCommandByproducts/External/CMakeLists.txt b/Tests/CustomCommandByproducts/External/CMakeLists.txt index feaa12e..81e072b 100644 --- a/Tests/CustomCommandByproducts/External/CMakeLists.txt +++ b/Tests/CustomCommandByproducts/External/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(External C) add_library(ExternalLibrary STATIC ExternalLibrary.c) diff --git a/Tests/FindPatch/CMakeLists.txt b/Tests/FindPatch/CMakeLists.txt index 541f5bd..65b778b 100644 --- a/Tests/FindPatch/CMakeLists.txt +++ b/Tests/FindPatch/CMakeLists.txt @@ -4,5 +4,6 @@ add_test(NAME FindPatch.Test COMMAND "${CMake_SOURCE_DIR}/Tests/FindPatch/Test" "${CMake_BINARY_DIR}/Tests/FindPatch/Test" ${build_generator_args} + --build-project TestFindPatch --build-options ${build_options} ) 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..930122c 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -469,7 +469,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/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/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/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) diff --git a/Utilities/cmcurl/lib/vtls/sectransp.c b/Utilities/cmcurl/lib/vtls/sectransp.c index ab79654..d903c53 100644 --- a/Utilities/cmcurl/lib/vtls/sectransp.c +++ b/Utilities/cmcurl/lib/vtls/sectransp.c @@ -136,6 +136,15 @@ /* The last #include file should be: */ #include "memdebug.h" + +#define DEBUG_CF 0 + +#if DEBUG_CF +#define CF_DEBUGF(x) x +#else +#define CF_DEBUGF(x) do { } while(0) +#endif + /* From MacTypes.h (which we can't include because it isn't present in iOS: */ #define ioErr -36 #define paramErr -50 @@ -838,6 +847,8 @@ static OSStatus bio_cf_in_read(SSLConnectionRef connection, DEBUGASSERT(data); nread = Curl_conn_cf_recv(cf->next, data, buf, *dataLength, &result); + CF_DEBUGF(infof(data, CFMSG(cf, "bio_read(len=%zu) -> %zd, result=%d"), + *dataLength, nread, result)); if(nread < 0) { switch(result) { case CURLE_OK: @@ -851,6 +862,9 @@ static OSStatus bio_cf_in_read(SSLConnectionRef connection, } nread = 0; } + else if((size_t)nread < *dataLength) { + rtn = errSSLWouldBlock; + } *dataLength = nread; return rtn; } @@ -865,22 +879,27 @@ static OSStatus bio_cf_out_write(SSLConnectionRef connection, struct Curl_easy *data = connssl->call_data; ssize_t nwritten; CURLcode result; - OSStatus ortn = noErr; + OSStatus rtn = noErr; DEBUGASSERT(data); nwritten = Curl_conn_cf_send(cf->next, data, buf, *dataLength, &result); + CF_DEBUGF(infof(data, CFMSG(cf, "bio_send(len=%zu) -> %zd, result=%d"), + *dataLength, nwritten, result)); if(nwritten <= 0) { if(result == CURLE_AGAIN) { - ortn = errSSLWouldBlock; + rtn = errSSLWouldBlock; backend->ssl_direction = true; } else { - ortn = ioErr; + rtn = ioErr; } nwritten = 0; } + else if((size_t)nwritten < *dataLength) { + rtn = errSSLWouldBlock; + } *dataLength = nwritten; - return ortn; + return rtn; } #ifndef CURL_DISABLE_VERBOSE_STRINGS @@ -1638,6 +1657,7 @@ static CURLcode sectransp_connect_step1(struct Curl_cfilter *cf, DEBUGASSERT(backend); + CF_DEBUGF(infof(data, CFMSG(cf, "connect_step1"))); GetDarwinVersionNumber(&darwinver_maj, &darwinver_min); #endif /* CURL_BUILD_MAC */ @@ -2231,7 +2251,8 @@ static int append_cert_to_array(struct Curl_easy *data, return CURLE_OK; } -static CURLcode verify_cert_buf(struct Curl_easy *data, +static CURLcode verify_cert_buf(struct Curl_cfilter *cf, + struct Curl_easy *data, const unsigned char *certbuf, size_t buflen, SSLContextRef ctx) { @@ -2239,7 +2260,12 @@ static CURLcode verify_cert_buf(struct Curl_easy *data, long res; unsigned char *der; size_t derlen, offset = 0; - + OSStatus ret; + SecTrustResultType trust_eval; + CFMutableArrayRef array = NULL; + SecTrustRef trust = NULL; + CURLcode result = CURLE_PEER_FAILED_VERIFICATION; + (void)cf; /* * Certbuf now contains the contents of the certificate file, which can be * - a single DER certificate, @@ -2249,11 +2275,11 @@ static CURLcode verify_cert_buf(struct Curl_easy *data, * Go through certbuf, and convert any PEM certificate in it into DER * format. */ - CFMutableArrayRef array = CFArrayCreateMutable(kCFAllocatorDefault, 0, - &kCFTypeArrayCallBacks); + array = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); if(!array) { failf(data, "SSL: out of memory creating CA certificate array"); - return CURLE_OUT_OF_MEMORY; + result = CURLE_OUT_OF_MEMORY; + goto out; } while(offset < buflen) { @@ -2265,10 +2291,10 @@ static CURLcode verify_cert_buf(struct Curl_easy *data, */ res = pem_to_der((const char *)certbuf + offset, &der, &derlen); if(res < 0) { - CFRelease(array); failf(data, "SSL: invalid CA certificate #%d (offset %zu) in bundle", n, offset); - return CURLE_SSL_CACERT_BADFILE; + result = CURLE_SSL_CACERT_BADFILE; + goto out; } offset += res; @@ -2276,8 +2302,9 @@ static CURLcode verify_cert_buf(struct Curl_easy *data, /* This is not a PEM file, probably a certificate in DER format. */ rc = append_cert_to_array(data, certbuf, buflen, array); if(rc != CURLE_OK) { - CFRelease(array); - return rc; + CF_DEBUGF(infof(data, CFMSG(cf, "append_cert for CA failed"))); + result = rc; + goto out; } break; } @@ -2289,63 +2316,73 @@ static CURLcode verify_cert_buf(struct Curl_easy *data, rc = append_cert_to_array(data, der, derlen, array); free(der); if(rc != CURLE_OK) { - CFRelease(array); - return rc; + CF_DEBUGF(infof(data, CFMSG(cf, "append_cert for CA failed"))); + result = rc; + goto out; } } - SecTrustRef trust; - OSStatus ret = SSLCopyPeerTrust(ctx, &trust); + ret = SSLCopyPeerTrust(ctx, &trust); if(!trust) { failf(data, "SSL: error getting certificate chain"); - CFRelease(array); - return CURLE_PEER_FAILED_VERIFICATION; + goto out; } else if(ret != noErr) { - CFRelease(array); failf(data, "SSLCopyPeerTrust() returned error %d", ret); - return CURLE_PEER_FAILED_VERIFICATION; + goto out; } + CF_DEBUGF(infof(data, CFMSG(cf, "setting %d trust anchors"), n)); ret = SecTrustSetAnchorCertificates(trust, array); if(ret != noErr) { - CFRelease(array); - CFRelease(trust); failf(data, "SecTrustSetAnchorCertificates() returned error %d", ret); - return CURLE_PEER_FAILED_VERIFICATION; + goto out; } ret = SecTrustSetAnchorCertificatesOnly(trust, true); if(ret != noErr) { - CFRelease(array); - CFRelease(trust); failf(data, "SecTrustSetAnchorCertificatesOnly() returned error %d", ret); - return CURLE_PEER_FAILED_VERIFICATION; + goto out; } - SecTrustResultType trust_eval = 0; + trust_eval = 0; ret = SecTrustEvaluate(trust, &trust_eval); - CFRelease(array); - CFRelease(trust); if(ret != noErr) { failf(data, "SecTrustEvaluate() returned error %d", ret); - return CURLE_PEER_FAILED_VERIFICATION; + goto out; } switch(trust_eval) { case kSecTrustResultUnspecified: + /* what does this really mean? */ + CF_DEBUGF(infof(data, CFMSG(cf, "trust result: Unspecified"))); + result = CURLE_OK; + goto out; case kSecTrustResultProceed: - return CURLE_OK; + CF_DEBUGF(infof(data, CFMSG(cf, "trust result: Proceed"))); + result = CURLE_OK; + goto out; case kSecTrustResultRecoverableTrustFailure: + failf(data, "SSL: peer not verified: RecoverableTrustFailure"); + goto out; case kSecTrustResultDeny: + failf(data, "SSL: peer not verified: Deny"); + goto out; default: - failf(data, "SSL: certificate verification failed (result: %d)", - trust_eval); - return CURLE_PEER_FAILED_VERIFICATION; + failf(data, "SSL: perr not verified: result=%d", trust_eval); + goto out; } + +out: + if(trust) + CFRelease(trust); + if(array) + CFRelease(array); + return result; } -static CURLcode verify_cert(struct Curl_easy *data, const char *cafile, +static CURLcode verify_cert(struct Curl_cfilter *cf, + struct Curl_easy *data, const char *cafile, const struct curl_blob *ca_info_blob, SSLContextRef ctx) { @@ -2354,6 +2391,7 @@ static CURLcode verify_cert(struct Curl_easy *data, const char *cafile, size_t buflen; if(ca_info_blob) { + CF_DEBUGF(infof(data, CFMSG(cf, "verify_peer, CA from config blob"))); certbuf = (unsigned char *)malloc(ca_info_blob->len + 1); if(!certbuf) { return CURLE_OUT_OF_MEMORY; @@ -2363,6 +2401,8 @@ static CURLcode verify_cert(struct Curl_easy *data, const char *cafile, certbuf[ca_info_blob->len]='\0'; } else if(cafile) { + CF_DEBUGF(infof(data, CFMSG(cf, "verify_peer, CA from file '%s'"), + cafile)); if(read_cert(cafile, &certbuf, &buflen) < 0) { failf(data, "SSL: failed to read or invalid CA certificate"); return CURLE_SSL_CACERT_BADFILE; @@ -2371,7 +2411,7 @@ static CURLcode verify_cert(struct Curl_easy *data, const char *cafile, else return CURLE_SSL_CACERT_BADFILE; - result = verify_cert_buf(data, certbuf, buflen, ctx); + result = verify_cert_buf(cf, data, certbuf, buflen, ctx); free(certbuf); return result; } @@ -2498,8 +2538,10 @@ static CURLcode sectransp_connect_step2(struct Curl_cfilter *cf, || ssl_connect_2_reading == connssl->connecting_state || ssl_connect_2_writing == connssl->connecting_state); DEBUGASSERT(backend); + CF_DEBUGF(infof(data, CFMSG(cf, "connect_step2"))); /* Here goes nothing: */ +check_handshake: err = SSLHandshake(backend->ssl_ctx); if(err != noErr) { @@ -2514,14 +2556,14 @@ static CURLcode sectransp_connect_step2(struct Curl_cfilter *cf, case -9841: if((conn_config->CAfile || conn_config->ca_info_blob) && conn_config->verifypeer) { - CURLcode result = verify_cert(data, conn_config->CAfile, + CURLcode result = verify_cert(cf, data, conn_config->CAfile, conn_config->ca_info_blob, backend->ssl_ctx); if(result) return result; } /* the documentation says we need to call SSLHandshake() again */ - return sectransp_connect_step2(cf, data); + goto check_handshake; /* Problem with encrypt / decrypt */ case errSSLPeerDecodeError: @@ -2961,6 +3003,7 @@ static CURLcode sectransp_connect_step3(struct Curl_cfilter *cf, { struct ssl_connect_data *connssl = cf->ctx; + CF_DEBUGF(infof(data, CFMSG(cf, "connect_step3"))); /* There is no step 3! * Well, okay, let's collect server certificates, and if verbose mode is on, * let's print the details of the server certificates. */ @@ -3069,6 +3112,7 @@ sectransp_connect_common(struct Curl_cfilter *cf, struct Curl_easy *data, } if(ssl_connect_done == connssl->connecting_state) { + CF_DEBUGF(infof(data, CFMSG(cf, "connected"))); connssl->state = ssl_connection_complete; *done = TRUE; } @@ -3114,6 +3158,7 @@ static void sectransp_close(struct Curl_cfilter *cf, struct Curl_easy *data) DEBUGASSERT(backend); if(backend->ssl_ctx) { + CF_DEBUGF(infof(data, CFMSG(cf, "close"))); (void)SSLClose(backend->ssl_ctx); #if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS if(SSLCreateContext) @@ -3157,6 +3202,7 @@ static int sectransp_shutdown(struct Curl_cfilter *cf, what = SOCKET_READABLE(cf->conn->sock[cf->sockindex], SSL_SHUTDOWN_TIMEOUT); + CF_DEBUGF(infof(data, CFMSG(cf, "shutdown"))); while(loop--) { if(what < 0) { /* anything that gets here is fatally bad */ @@ -3225,6 +3271,7 @@ static int sectransp_check_cxn(struct Curl_cfilter *cf, DEBUGASSERT(backend); if(backend->ssl_ctx) { + CF_DEBUGF(infof(data, CFMSG(cf, "check connection"))); err = SSLGetSessionState(backend->ssl_ctx, &state); if(err == noErr) return state == kSSLConnected || state == kSSLHandshake; @@ -3245,6 +3292,7 @@ static bool sectransp_data_pending(struct Curl_cfilter *cf, DEBUGASSERT(backend); if(backend->ssl_ctx) { /* SSL is in use */ + CF_DEBUGF(infof(data, CFMSG(cf, "data_pending"))); err = SSLGetBufferedReadSize(backend->ssl_ctx, &buffer); if(err == noErr) return buffer > 0UL; @@ -3402,7 +3450,7 @@ static ssize_t sectransp_recv(struct Curl_cfilter *cf, case -9841: if((conn_config->CAfile || conn_config->ca_info_blob) && conn_config->verifypeer) { - CURLcode result = verify_cert(data, conn_config->CAfile, + CURLcode result = verify_cert(cf, data, conn_config->CAfile, conn_config->ca_info_blob, backend->ssl_ctx); if(result) @@ -569,7 +569,6 @@ KWSYS_FILES="\ RegularExpression.hxx \ Status.hxx \ String.h \ - String.hxx \ System.h \ SystemTools.hxx \ Terminal.h" |