diff --git a/Help/policy/CMP0000.rst b/Help/policy/CMP0000.rst index aecfa71876..5f146bc47a 100644 --- a/Help/policy/CMP0000.rst +++ b/Help/policy/CMP0000.rst @@ -21,14 +21,12 @@ the project. See documentation of :command:`cmake_minimum_required` for details. Note that the command invocation must appear in the ``CMakeLists.txt`` -file itself; a call in an included file is not sufficient. However, -the :command:`cmake_policy` command may be called to set policy ``CMP0000`` -to ``OLD`` or ``NEW`` behavior explicitly. The ``OLD`` behavior is to -silently ignore the missing invocation. The ``NEW`` behavior is to issue -an error instead of a warning. An included file may set ``CMP0000`` -explicitly to affect how this policy is enforced for the main -``CMakeLists.txt`` file. +file itself; a call in an included file is not sufficient. The ``OLD`` +behavior was to silently ignore the missing invocation. The ``NEW`` +behavior is to issue an error instead of a warning. -This policy was introduced in CMake version 2.6.0. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0015.rst b/Help/policy/CMP0015.rst index cd65c3f56b..2e185069c9 100644 --- a/Help/policy/CMP0015.rst +++ b/Help/policy/CMP0015.rst @@ -1,7 +1,7 @@ CMP0015 ------- - :command:`link_directories` treats paths relative to the source dir. +:command:`link_directories` treats paths relative to the source dir. In CMake 2.8.0 and lower the :command:`link_directories` command passed relative paths unchanged to the linker. In CMake 2.8.1 and above the diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index d279f3f367..39bd180e05 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -610,7 +610,7 @@ cmComputeLinkDepends::cmComputeLinkDepends(const cmGeneratorTarget* target, , DebugMode(this->Makefile->IsOn("CMAKE_LINK_DEPENDS_DEBUG_MODE") || this->Target->GetProperty("LINK_DEPENDS_DEBUG_MODE").IsOn()) , LinkLanguage(linkLanguage) - , LinkType(CMP0003_ComputeLinkType( + , LinkType(ComputeLinkType( this->Config, this->Makefile->GetCMakeInstance()->GetDebugConfigs())) , Strategy(strategy) diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 8ae98e8eac..93ad11919b 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -264,9 +264,6 @@ public: cmLinkInterface const* GetLinkInterface( const std::string& config, const cmGeneratorTarget* headTarget) const; - void ComputeLinkInterface(const std::string& config, - cmOptionalLinkInterface& iface, - const cmGeneratorTarget* head) const; enum class UseTo { diff --git a/Source/cmGeneratorTarget_Link.cxx b/Source/cmGeneratorTarget_Link.cxx index ee1c91f3c6..87c41b46de 100644 --- a/Source/cmGeneratorTarget_Link.cxx +++ b/Source/cmGeneratorTarget_Link.cxx @@ -683,13 +683,6 @@ cmLinkInterface const* cmGeneratorTarget::GetLinkInterface( return iface.Exists ? &iface : nullptr; } -void cmGeneratorTarget::ComputeLinkInterface( - const std::string& config, cmOptionalLinkInterface& iface, - cmGeneratorTarget const* headTarget) const -{ - this->ComputeLinkInterface(config, iface, headTarget, false); -} - void cmGeneratorTarget::ComputeLinkInterface( const std::string& config, cmOptionalLinkInterface& iface, cmGeneratorTarget const* headTarget, bool secondPass) const @@ -1449,8 +1442,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries( std::vector debugConfigs = this->Makefile->GetCMakeInstance()->GetDebugConfigs(); - cmTargetLinkLibraryType linkType = - CMP0003_ComputeLinkType(config, debugConfigs); + cmTargetLinkLibraryType linkType = ComputeLinkType(config, debugConfigs); cmTarget::LinkLibraryVectorType const& oldllibs = this->Target->GetOriginalLinkLibraries(); diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h index 70efb16abd..4ef0566c54 100644 --- a/Source/cmLinkItem.h +++ b/Source/cmLinkItem.h @@ -153,7 +153,7 @@ struct cmOptionalLinkImplementation : public cmLinkImplementation }; /** Compute the link type to use for the given configuration. */ -inline cmTargetLinkLibraryType CMP0003_ComputeLinkType( +inline cmTargetLinkLibraryType ComputeLinkType( const std::string& config, std::vector const& debugConfigs) { // No configuration is always optimized. diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 57a3b81e01..fa64029104 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -277,6 +277,21 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, warnCompat); } +namespace { +bool IsFromLegacyInstallEXPORT(cmMakefile* mf, unsigned int majorVer, + unsigned int minorVer, unsigned int patchVer) +{ + return majorVer == 2 && minorVer == 6 && patchVer == 0 && + mf->GetStateSnapshot().CanPopPolicyScope() && + cmSystemTools::Strucmp(mf->GetBacktrace().Top().Name.c_str(), + "cmake_policy") == 0; +} +#define ADVICE_UPDATE_VERSION_ARGUMENT \ + "Update the VERSION argument value. Or, use the ... " \ + "syntax to tell CMake that the project requires at least but has " \ + "been updated to work with policies introduced by or earlier." +} + bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, unsigned int minorVer, unsigned int patchVer, @@ -285,19 +300,13 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, // Warn about policy versions for which support will be removed. if (warnCompat == WarnCompat::On && (majorVer < 3 || (majorVer == 3 && minorVer < 10)) && - // Avoid warning on calls generated by install(EXPORT) + // Silently tolerate cmake_policy calls generated by install(EXPORT) // in CMake versions prior to 3.18. - !(majorVer == 2 && minorVer == 6 && patchVer == 0 && - mf->GetStateSnapshot().CanPopPolicyScope() && - cmSystemTools::Strucmp(mf->GetBacktrace().Top().Name.c_str(), - "cmake_policy") == 0)) { + !IsFromLegacyInstallEXPORT(mf, majorVer, minorVer, patchVer)) { mf->IssueMessage( MessageType::DEPRECATION_WARNING, "Compatibility with CMake < 3.10 will be removed from " - "a future version of CMake.\n" - "Update the VERSION argument value. Or, use the ... " - "syntax to tell CMake that the project requires at least but has " - "been updated to work with policies introduced by or earlier."); + "a future version of CMake.\n" ADVICE_UPDATE_VERSION_ARGUMENT); } // now loop over all the policies and set them as appropriate diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt index 9eeb532a11..341b135660 100644 --- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt @@ -1,7 +1,7 @@ # Using 2.8 will trigger a deprecation warning. In this case it's explicitly # intentional since the tests checks various policy implementations prior to # 3.10 -cmake_minimum_required(VERSION 2.8.10) # old enough to not set CMP0022 +cmake_minimum_required(VERSION 2.8.11) # old enough to not set CMP0022 if(POLICY CMP0129) cmake_policy(SET CMP0129 NEW) @@ -151,7 +151,7 @@ add_subdirectory(SubDirB) target_link_libraries(SubDirB TopDirImported) add_subdirectory(SubDirC) target_link_libraries(SubDirC PRIVATE SubDirC2) -target_link_libraries(TopDir SubDirC) +target_link_libraries(TopDir PRIVATE SubDirC) add_library(TopDirImported IMPORTED INTERFACE) target_compile_definitions(TopDirImported INTERFACE DEF_TopDirImported) cmake_policy(POP) diff --git a/Tests/CMakeLib/testDebuggerVariablesHelper.cxx b/Tests/CMakeLib/testDebuggerVariablesHelper.cxx index 5fe1c634fc..e3dbbceaff 100644 --- a/Tests/CMakeLib/testDebuggerVariablesHelper.cxx +++ b/Tests/CMakeLib/testDebuggerVariablesHelper.cxx @@ -74,9 +74,9 @@ static bool testCreateFromPolicyMap() std::make_shared(); cmPolicies::PolicyMap policyMap; - policyMap.Set(cmPolicies::CMP0000, cmPolicies::NEW); - policyMap.Set(cmPolicies::CMP0003, cmPolicies::WARN); - policyMap.Set(cmPolicies::CMP0005, cmPolicies::OLD); + policyMap.Set(cmPolicies::CMP0178, cmPolicies::NEW); + policyMap.Set(cmPolicies::CMP0179, cmPolicies::WARN); + policyMap.Set(cmPolicies::CMP0180, cmPolicies::OLD); auto vars = cmDebugger::cmDebuggerVariablesHelper::Create( variablesManager, "Locals", true, policyMap); @@ -84,9 +84,9 @@ static bool testCreateFromPolicyMap() variablesManager->HandleVariablesRequest( CreateVariablesRequest(vars->GetId())); ASSERT_TRUE(variables.size() == 3); - ASSERT_VARIABLE(variables[0], "CMP0000", "NEW", "string"); - ASSERT_VARIABLE(variables[1], "CMP0003", "WARN", "string"); - ASSERT_VARIABLE(variables[2], "CMP0005", "OLD", "string"); + ASSERT_VARIABLE(variables[0], "CMP0178", "NEW", "string"); + ASSERT_VARIABLE(variables[1], "CMP0179", "WARN", "string"); + ASSERT_VARIABLE(variables[2], "CMP0180", "OLD", "string"); return true; } diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt index a1a9709bd3..253a03554b 100644 --- a/Tests/CPackComponentsForAll/CMakeLists.txt +++ b/Tests/CPackComponentsForAll/CMakeLists.txt @@ -7,7 +7,7 @@ # Depending on the CPack generator and on some CPACK_xxx var values # the generator may produce a single (NSIS, productbuild) # or several package files (Archive Generators, RPM, DEB) -cmake_minimum_required(VERSION 2.8.3.20101130 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project(CPackComponentsForAll) # Use GNUInstallDirs in order to enforce lib64 if needed diff --git a/Tests/EmptyProperty/CMakeLists.txt b/Tests/EmptyProperty/CMakeLists.txt index 39e75f36a9..b6f393c357 100644 --- a/Tests/EmptyProperty/CMakeLists.txt +++ b/Tests/EmptyProperty/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) project (EmptyProperty) set_property(DIRECTORY APPEND diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 3d0067319c..12081522ac 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -168,7 +168,7 @@ if(EP_TEST_CVS) ExternalProject_Add(${proj} SOURCE_DIR ${local_cvs_repo} URL ${CMAKE_CURRENT_SOURCE_DIR}/cvsrepo.tgz - URL_MD5 55fc85825ffdd9ed2597123c68b79f7e + URL_MD5 287399370738adfe932e036cbe38d5b0 BUILD_COMMAND "" CONFIGURE_COMMAND "${CVS_EXECUTABLE}" --version INSTALL_COMMAND "" @@ -190,11 +190,11 @@ if(EP_TEST_CVS) # CVS by date stamp: # - set(proj TutorialStep1-CVS-20090626) + set(proj TutorialStep1-CVS-20241115) ExternalProject_Add(${proj} CVS_REPOSITORY ":local:${local_cvs_repo}" CVS_MODULE "TutorialStep1" - CVS_TAG "-D2009-06-26 16:50:00 UTC" + CVS_TAG "-D2024-11-15 23:11:00 UTC" UPDATE_COMMAND "" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= @@ -229,7 +229,7 @@ if(EP_TEST_CVS) INSTALL_COMMAND "" DEPENDS "SetupLocalCVSRepository" DEPENDS "EmptyNoOpProject" - DEPENDS "TutorialStep1-CVS-20090626" + DEPENDS "TutorialStep1-CVS-20241115" DEPENDS "TutorialStep1-CVS-testtag1" ) set_property(TARGET ${proj} PROPERTY FOLDER "CVS") @@ -248,7 +248,7 @@ if(EP_TEST_SVN) ExternalProject_Add(${proj} SOURCE_DIR ${local_svn_repo} URL ${CMAKE_CURRENT_SOURCE_DIR}/svnrepo.tgz - URL_MD5 2f468be4ed1fa96377fca0cc830819c4 + URL_MD5 0d75c80611c998e36c36f4a9e1e739d0 BUILD_COMMAND "" CONFIGURE_COMMAND "${Subversion_SVN_EXECUTABLE}" --version INSTALL_COMMAND "" @@ -258,10 +258,10 @@ if(EP_TEST_SVN) # SVN by date stamp: # - set(proj TutorialStep1-SVN-20090626) + set(proj TutorialStep1-SVN-20241115) ExternalProject_Add(${proj} SVN_REPOSITORY "${local_svn_repo_url}" - SVN_REVISION "-r{2009-06-26 16:50:00 +0000}" + SVN_REVISION "-r{2024-11-15 23:23:00 +0000}" UPDATE_COMMAND "" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= @@ -272,10 +272,10 @@ if(EP_TEST_SVN) # SVN by revision number: # - set(proj TutorialStep1-SVN-r2) + set(proj TutorialStep1-SVN-r3) ExternalProject_Add(${proj} SVN_REPOSITORY "${local_svn_repo_url}" - SVN_REVISION "-r2" + SVN_REVISION "-r3" UPDATE_COMMAND "" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= @@ -320,7 +320,7 @@ if(EP_TEST_GIT) set(proj TutorialStep1-GIT-byhash) ExternalProject_Add(${proj} GIT_REPOSITORY "${local_git_repo}" - GIT_TAG 57418671a0a0e371e7bac532337152595fbe0df5 # generated by gitrepo.bash + GIT_TAG 4ed00009457732fc8b6d75f6159bbc384119c3d1 # generated by gitrepo.bash UPDATE_COMMAND "" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= @@ -568,7 +568,7 @@ if(EP_TEST_HG) set(proj TutorialStep1-HG-byhash) ExternalProject_Add(${proj} HG_REPOSITORY "${local_hg_repo}" - HG_TAG dd2ce38a6b8a + HG_TAG fc5a0c915390 UPDATE_COMMAND "" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= @@ -621,8 +621,8 @@ enable_testing() # BuildTree tests: # if(EP_TEST_CVS) - add_test(TutorialStep1-CVS-20090626-BuildTreeTest - "${binary_base}/TutorialStep1-CVS-20090626/Tutorial" 4) + add_test(TutorialStep1-CVS-20241115-BuildTreeTest + "${binary_base}/TutorialStep1-CVS-20241115/Tutorial" 4) add_test(TutorialStep1-CVS-testtag1-BuildTreeTest "${binary_base}/TutorialStep1-CVS-testtag1/Tutorial" 64) @@ -632,11 +632,11 @@ if(EP_TEST_CVS) endif() if(EP_TEST_SVN) - add_test(TutorialStep1-SVN-20090626-BuildTreeTest - "${binary_base}/TutorialStep1-SVN-20090626/Tutorial" 100) + add_test(TutorialStep1-SVN-20241115-BuildTreeTest + "${binary_base}/TutorialStep1-SVN-20241115/Tutorial" 100) - add_test(TutorialStep1-SVN-r2-BuildTreeTest - "${binary_base}/TutorialStep1-SVN-r2/Tutorial" 99) + add_test(TutorialStep1-SVN-r3-BuildTreeTest + "${binary_base}/TutorialStep1-SVN-r3/Tutorial" 99) add_test(TutorialStep1-SVN-trunk-BuildTreeTest "${binary_base}/TutorialStep1-SVN-trunk/Tutorial" 98) diff --git a/Tests/ExternalProject/cvsrepo.tgz b/Tests/ExternalProject/cvsrepo.tgz index baba6d3c2e..25bb7c3e81 100644 Binary files a/Tests/ExternalProject/cvsrepo.tgz and b/Tests/ExternalProject/cvsrepo.tgz differ diff --git a/Tests/ExternalProject/gitrepo-sub-rec.tgz b/Tests/ExternalProject/gitrepo-sub-rec.tgz index 0e63651c02..838d212e26 100644 Binary files a/Tests/ExternalProject/gitrepo-sub-rec.tgz and b/Tests/ExternalProject/gitrepo-sub-rec.tgz differ diff --git a/Tests/ExternalProject/gitrepo-sub.tgz b/Tests/ExternalProject/gitrepo-sub.tgz index ab34fff0b7..20ec5b8fa2 100644 Binary files a/Tests/ExternalProject/gitrepo-sub.tgz and b/Tests/ExternalProject/gitrepo-sub.tgz differ diff --git a/Tests/ExternalProject/gitrepo.bash b/Tests/ExternalProject/gitrepo.bash index c341f282e6..fd03c819f0 100755 --- a/Tests/ExternalProject/gitrepo.bash +++ b/Tests/ExternalProject/gitrepo.bash @@ -13,6 +13,9 @@ export GIT_AUTHOR_NAME='testauthor' export GIT_AUTHOR_EMAIL='testauthor@cmake.org' export GIT_COMMITTER_NAME='testauthor' export GIT_COMMITTER_EMAIL='testauthor@cmake.org' +export GIT_CONFIG_NOSYSTEM=1 +export GIT_CONFIG_GLOBAL="$tmpdir/.gitconfig" +git config --global protocol.file.allow always ( cd "$tmpdir" @@ -23,7 +26,7 @@ rm -f gitrepo.git/hooks/*.sample mkdir gitrepo cd gitrepo git init -b "$defaultBranch" -echo 'cmake_minimum_required(VERSION 3.19) +echo 'cmake_minimum_required(VERSION 3.31) project(Example NONE) add_custom_target(example ALL COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/example.cmake.in example.cmake @@ -43,7 +46,7 @@ rm -f gitrepo-sub.git/hooks/*.sample mkdir gitrepo-sub cd gitrepo-sub git init -b "$defaultBranch" -echo 'cmake_minimum_required(VERSION 3.19) +echo 'cmake_minimum_required(VERSION 3.31) project(ExampleWithSub NONE) file(STRINGS "${CMAKE_SOURCE_DIR}/.git/config" git_config_strings REGEX "^\\[submodule") diff --git a/Tests/ExternalProject/gitrepo.tgz b/Tests/ExternalProject/gitrepo.tgz index 8d2d14472d..63a6ddcccd 100644 Binary files a/Tests/ExternalProject/gitrepo.tgz and b/Tests/ExternalProject/gitrepo.tgz differ diff --git a/Tests/ExternalProject/hgrepo.tgz b/Tests/ExternalProject/hgrepo.tgz index 0d75ce22f0..aebbcc0902 100644 Binary files a/Tests/ExternalProject/hgrepo.tgz and b/Tests/ExternalProject/hgrepo.tgz differ diff --git a/Tests/ExternalProject/svnrepo.tgz b/Tests/ExternalProject/svnrepo.tgz index b8484165e0..da5350f913 100644 Binary files a/Tests/ExternalProject/svnrepo.tgz and b/Tests/ExternalProject/svnrepo.tgz differ diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt index f9abe11bea..7caefae383 100644 --- a/Tests/ExternalProjectLocal/CMakeLists.txt +++ b/Tests/ExternalProjectLocal/CMakeLists.txt @@ -79,7 +79,7 @@ set_property(TARGET ${proj} PROPERTY FOLDER "Local") set(proj TutorialStep1-LocalTAR) ExternalProject_Add(${proj} URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tar" - URL_MD5 a87c5b47c0201c09ddfe1d5738fdb1e3 + URL_MD5 e3774630066d0df5b9074cb777d72802 LIST_SEPARATOR :: PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Step1Patch.cmake CMAKE_GENERATOR "${CMAKE_GENERATOR}" @@ -94,7 +94,7 @@ set_property(TARGET ${proj} PROPERTY FOLDER "Local/TAR") set(proj TutorialStep1-LocalNoDirTAR) ExternalProject_Add(${proj} URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tar" - URL_MD5 d09e3d370c5c908fa035c30939ee438e + URL_MD5 a7357d2e8a52cc807957634ea135eb31 LIST_SEPARATOR @@ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -G ${CMAKE_GENERATOR} -DTEST_LIST:STRING=1@@2@@3 @@ -115,7 +115,7 @@ ExternalProject_Add_Step(${proj} mypatch set(proj TutorialStep1-LocalTGZ) ExternalProject_Add(${proj} URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz" - URL_MD5 38c648e817339c356f6be00eeed79bd0 + URL_MD5 c04edffa0520d5468d51ecd13a971828 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= -G ${CMAKE_GENERATOR} INSTALL_COMMAND "" LOG_BUILD 1 @@ -126,7 +126,7 @@ set_property(TARGET ${proj} PROPERTY FOLDER "Local/TGZ") set(proj TutorialStep1-LocalNoDirTGZ) ExternalProject_Add(${proj} URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tgz" - URL_HASH SHA256=496229e2a5ed620a37c385ad9406004a18026beab8b55dd2c4565d4b7f1d5383 + URL_HASH SHA256=b9aff8a865842b21cb3bc2ec8bed426b46ef560518962a81242c7f2e089c00de CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= INSTALL_COMMAND "" diff --git a/Tests/ExternalProjectLocal/Step1.tar b/Tests/ExternalProjectLocal/Step1.tar index 3711f07fb3..e99effbaaa 100644 Binary files a/Tests/ExternalProjectLocal/Step1.tar and b/Tests/ExternalProjectLocal/Step1.tar differ diff --git a/Tests/ExternalProjectLocal/Step1.tar.bz2 b/Tests/ExternalProjectLocal/Step1.tar.bz2 index 49b5f23a6b..3aa9e2a477 100644 Binary files a/Tests/ExternalProjectLocal/Step1.tar.bz2 and b/Tests/ExternalProjectLocal/Step1.tar.bz2 differ diff --git a/Tests/ExternalProjectLocal/Step1.tgz b/Tests/ExternalProjectLocal/Step1.tgz index d9b4cd259d..c1f36a3906 100644 Binary files a/Tests/ExternalProjectLocal/Step1.tgz and b/Tests/ExternalProjectLocal/Step1.tgz differ diff --git a/Tests/ExternalProjectLocal/Step1.zip b/Tests/ExternalProjectLocal/Step1.zip index 49dac24edf..c1fe9ed206 100644 Binary files a/Tests/ExternalProjectLocal/Step1.zip and b/Tests/ExternalProjectLocal/Step1.zip differ diff --git a/Tests/ExternalProjectLocal/Step1NoDir.tar b/Tests/ExternalProjectLocal/Step1NoDir.tar index 03664b856b..c60961cf07 100644 Binary files a/Tests/ExternalProjectLocal/Step1NoDir.tar and b/Tests/ExternalProjectLocal/Step1NoDir.tar differ diff --git a/Tests/ExternalProjectLocal/Step1NoDir.tar.bz2 b/Tests/ExternalProjectLocal/Step1NoDir.tar.bz2 index 92eb480d6a..f4edfa8900 100644 Binary files a/Tests/ExternalProjectLocal/Step1NoDir.tar.bz2 and b/Tests/ExternalProjectLocal/Step1NoDir.tar.bz2 differ diff --git a/Tests/ExternalProjectLocal/Step1NoDir.tgz b/Tests/ExternalProjectLocal/Step1NoDir.tgz index 71a2d81421..66facf6d0a 100644 Binary files a/Tests/ExternalProjectLocal/Step1NoDir.tgz and b/Tests/ExternalProjectLocal/Step1NoDir.tgz differ diff --git a/Tests/ExternalProjectLocal/Step1NoDir.zip b/Tests/ExternalProjectLocal/Step1NoDir.zip index b42d318798..6717202962 100644 Binary files a/Tests/ExternalProjectLocal/Step1NoDir.zip and b/Tests/ExternalProjectLocal/Step1NoDir.zip differ diff --git a/Tests/ExternalProjectLocal/Step5/CMakeLists.txt b/Tests/ExternalProjectLocal/Step5/CMakeLists.txt index bde264123a..94845fe1d6 100644 --- a/Tests/ExternalProjectLocal/Step5/CMakeLists.txt +++ b/Tests/ExternalProjectLocal/Step5/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.31) project (Tutorial) # The version number. diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index 08e533b9f1..96dca38874 100644 --- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake +++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -189,16 +189,16 @@ endif() file(REMOVE_RECURSE ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals) if(do_git_tests) - check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 REBASE) - check_a_tag(tag1 d1970730310fe8bc07e73f15dc570071f9f9654a 1 0 REBASE) + check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 REBASE) + check_a_tag(tag1 4209914b424925d6f1b558d79454d60967d4b0f3 1 0 REBASE) # With the Git UPDATE_COMMAND performance patch, this will not require a # 'git fetch' - check_a_tag(tag1 d1970730310fe8bc07e73f15dc570071f9f9654a 0 0 REBASE) - check_a_tag(tag2 5842b503ba4113976d9bb28d57b5aee1ad2736b7 1 0 REBASE) - check_a_tag(d19707303 d1970730310fe8bc07e73f15dc570071f9f9654a 0 0 REBASE) - check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 REBASE) + check_a_tag(tag1 4209914b424925d6f1b558d79454d60967d4b0f3 0 0 REBASE) + check_a_tag(tag2 ae72641040f1c9512f152d08afb6909f0498f958 1 0 REBASE) + check_a_tag(4209914b42 4209914b424925d6f1b558d79454d60967d4b0f3 0 0 REBASE) + check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 REBASE) # This is a remote symbolic ref, so it will always trigger a 'git fetch' - check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 REBASE) + check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 REBASE) foreach(strategy IN ITEMS CHECKOUT REBASE_CHECKOUT) # Move local master back, then apply a change that will cause a conflict @@ -232,7 +232,7 @@ if(do_git_tests) message(FATAL_ERROR "Could not commit conflicting change.") endif() # This should discard our commit but leave behind an annotated tag - check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 ${strategy}) + check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 ${strategy}) endforeach() # This file matches a .gitignore rule that the last commit defines. We can't @@ -242,7 +242,7 @@ if(do_git_tests) # doesn't choke on it. set(ignoredFile ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals/Source/TutorialStep1-GIT/ignored_item) file(TOUCH ${ignoredFile}) - check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 REBASE) + check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 REBASE) if(NOT EXISTS ${ignoredFile}) message(FATAL_ERROR "Ignored file is missing") endif() diff --git a/Tests/ExternalProjectUpdate/gitrepo.tgz b/Tests/ExternalProjectUpdate/gitrepo.tgz index 4dab56be60..be00071dd0 100644 Binary files a/Tests/ExternalProjectUpdate/gitrepo.tgz and b/Tests/ExternalProjectUpdate/gitrepo.tgz differ diff --git a/Tests/LibName/CMakeLists.txt b/Tests/LibName/CMakeLists.txt index b8f0890927..3624f961a0 100644 --- a/Tests/LibName/CMakeLists.txt +++ b/Tests/LibName/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) project(LibName) # this is a test to make sure that relative path # LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH work diff --git a/Tests/LinkLine/CMakeLists.txt b/Tests/LinkLine/CMakeLists.txt index 6154dd4694..0e7ff4798c 100644 --- a/Tests/LinkLine/CMakeLists.txt +++ b/Tests/LinkLine/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) project( LinkLine ) # Makes sure that the library order as specified by the user are diff --git a/Tests/LinkLineOrder/CMakeLists.txt b/Tests/LinkLineOrder/CMakeLists.txt index 78455e9712..b4c8876f28 100644 --- a/Tests/LinkLineOrder/CMakeLists.txt +++ b/Tests/LinkLineOrder/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) project( LinkLineOrder ) # This tests ensures that the order of libraries are preserved when diff --git a/Tests/PolicyScope/Bar.cmake b/Tests/PolicyScope/Bar.cmake index 5202cb5e12..f15124f78a 100644 --- a/Tests/PolicyScope/Bar.cmake +++ b/Tests/PolicyScope/Bar.cmake @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.31) # Make sure a policy set differently by our includer is now correct. -cmake_policy(GET CMP0003 cmp) -check(CMP0003 "NEW" "${cmp}") +cmake_policy(GET CMP0180 cmp) +check(CMP0180 "NEW" "${cmp}") # Test allowing the top-level file to not have cmake_minimum_required. cmake_policy(SET CMP0000 OLD) diff --git a/Tests/PolicyScope/CMakeLists.txt b/Tests/PolicyScope/CMakeLists.txt index 353842bc48..36ba01a7fb 100644 --- a/Tests/PolicyScope/CMakeLists.txt +++ b/Tests/PolicyScope/CMakeLists.txt @@ -12,9 +12,7 @@ endfunction() #----------------------------------------------------------------------------- # Test using a development framework that sets policies for us. -# Policy CMP0011 should not be set at this point. -cmake_policy(GET CMP0011 cmp) -check(CMP0011 "" "${cmp}") +cmake_policy(SET CMP0011 OLD) # Put the test modules in the search path. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) @@ -23,22 +21,22 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) find_package(Foo) # Check policies set by the package. -cmake_policy(GET CMP0003 cmp) -check(CMP0003 "OLD" "${cmp}") -cmake_policy(GET CMP0002 cmp) -check(CMP0002 "NEW" "${cmp}") +cmake_policy(GET CMP0180 cmp) +check(CMP0180 "OLD" "${cmp}") +cmake_policy(GET CMP0179 cmp) +check(CMP0179 "NEW" "${cmp}") cmake_policy(GET CMP0011 cmp) check(CMP0011 "NEW" "${cmp}") # Make sure an included file cannot change policies. include(Bar) -cmake_policy(GET CMP0003 cmp) -check(CMP0003 "OLD" "${cmp}") +cmake_policy(GET CMP0180 cmp) +check(CMP0180 "OLD" "${cmp}") # Allow the included file to change policies. include(Bar NO_POLICY_SCOPE) -cmake_policy(GET CMP0003 cmp) -check(CMP0003 "NEW" "${cmp}") +cmake_policy(GET CMP0180 cmp) +check(CMP0180 "NEW" "${cmp}") #----------------------------------------------------------------------------- # Test function and macro policy recording. @@ -46,65 +44,65 @@ check(CMP0003 "NEW" "${cmp}") # Create the functions in an isolated scope in which we change policies. cmake_policy(PUSH) if(1) - # Change CMP0002 - cmake_policy(SET CMP0002 OLD) + # Change CMP0179 + cmake_policy(SET CMP0179 OLD) function(func1) - # CMP0002 should be changed when this function is invoked - cmake_policy(GET CMP0002 cmp) - check(CMP0002 "OLD" "${cmp}") + # CMP0179 should be changed when this function is invoked + cmake_policy(GET CMP0179 cmp) + check(CMP0179 "OLD" "${cmp}") # The undocumented PARENT_SCOPE option sees the caller's setting. - cmake_policy(GET CMP0002 cmp PARENT_SCOPE) - check(CMP0002 "NEW" "${cmp}") + cmake_policy(GET CMP0179 cmp PARENT_SCOPE) + check(CMP0179 "NEW" "${cmp}") endfunction() - # Unset CMP0002 - cmake_policy(VERSION 2.4) + # Unset CMP0179 + cmake_policy(VERSION 3.30) macro(macro1) - # CMP0002 should be unset when this macro is invoked - cmake_policy(GET CMP0002 cmp) - check(CMP0002 "" "${cmp}") + # CMP0179 should be unset when this macro is invoked + cmake_policy(GET CMP0179 cmp) + check(CMP0179 "" "${cmp}") # The undocumented PARENT_SCOPE option sees the caller's setting. - cmake_policy(GET CMP0002 cmp PARENT_SCOPE) - check(CMP0002 "NEW" "${cmp}") + cmake_policy(GET CMP0179 cmp PARENT_SCOPE) + check(CMP0179 "NEW" "${cmp}") # Setting the policy should work here and also in the caller. - cmake_policy(SET CMP0002 OLD) - cmake_policy(GET CMP0002 cmp) - check(CMP0002 "OLD" "${cmp}") + cmake_policy(SET CMP0179 OLD) + cmake_policy(GET CMP0179 cmp) + check(CMP0179 "OLD" "${cmp}") endmacro() endif() cmake_policy(POP) -# CMP0002 should still be NEW in this context. -cmake_policy(GET CMP0002 cmp) -check(CMP0002 "NEW" "${cmp}") +# CMP0179 should still be NEW in this context. +cmake_policy(GET CMP0179 cmp) +check(CMP0179 "NEW" "${cmp}") # Check the recorded policies func1() macro1() -# The macro should have changed CMP0002. -cmake_policy(GET CMP0002 cmp) -check(CMP0002 "OLD" "${cmp}") +# The macro should have changed CMP0179. +cmake_policy(GET CMP0179 cmp) +check(CMP0179 "OLD" "${cmp}") #----------------------------------------------------------------------------- # Test CMAKE_POLICY_DEFAULT_CMP variable. cmake_policy(PUSH) - set(CMAKE_POLICY_DEFAULT_CMP0010 OLD) # ignored - set(CMAKE_POLICY_DEFAULT_CMP0012 OLD) # honored - set(CMAKE_POLICY_DEFAULT_CMP0013 NEW) # honored - set(CMAKE_POLICY_DEFAULT_CMP0014 "") # noop - cmake_policy(VERSION 2.6.3) - cmake_policy(GET CMP0010 cmp) - check(CMP0010 "NEW" "${cmp}") - cmake_policy(GET CMP0012 cmp) - check(CMP0012 "OLD" "${cmp}") - cmake_policy(GET CMP0013 cmp) - check(CMP0013 "NEW" "${cmp}") - cmake_policy(GET CMP0014 cmp) - check(CMP0014 "" "${cmp}") + set(CMAKE_POLICY_DEFAULT_CMP0170 OLD) # ignored + set(CMAKE_POLICY_DEFAULT_CMP0171 OLD) # honored + set(CMAKE_POLICY_DEFAULT_CMP0172 NEW) # honored + set(CMAKE_POLICY_DEFAULT_CMP0173 "") # noop + cmake_policy(VERSION 3.30) + cmake_policy(GET CMP0170 cmp) + check(CMP0170 "NEW" "${cmp}") + cmake_policy(GET CMP0171 cmp) + check(CMP0171 "OLD" "${cmp}") + cmake_policy(GET CMP0172 cmp) + check(CMP0172 "NEW" "${cmp}") + cmake_policy(GET CMP0173 cmp) + check(CMP0173 "" "${cmp}") cmake_policy(POP) #----------------------------------------------------------------------------- diff --git a/Tests/PolicyScope/FindFoo.cmake b/Tests/PolicyScope/FindFoo.cmake index e364b6d95e..843c650714 100644 --- a/Tests/PolicyScope/FindFoo.cmake +++ b/Tests/PolicyScope/FindFoo.cmake @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 3.10) -cmake_policy(SET CMP0003 OLD) +cmake_minimum_required(VERSION 3.31) +cmake_policy(SET CMP0180 OLD) diff --git a/Tests/PreOrder/CMakeLists.txt b/Tests/PreOrder/CMakeLists.txt index 8b4c43954b..1fcdf66979 100644 --- a/Tests/PreOrder/CMakeLists.txt +++ b/Tests/PreOrder/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) # a simple test case project (PreOrder) set(CMAKE_IGNORE_DEPENDENCIES_ORDERING 1) diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt index 8f85fbf540..129b75c0ab 100644 --- a/Tests/RunCMake/CMP0019/CMakeLists.txt +++ b/Tests/RunCMake/CMP0019/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 2.8.10) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake index 3fee15d8b9..308980c59c 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW.cmake @@ -1,5 +1,5 @@ -project(CMP0022-NOWARN-static-NEW) +enable_language(CXX) cmake_policy(SET CMP0022 NEW) diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake index 3e4144fcd5..17f71b0326 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake @@ -1,5 +1,5 @@ -project(CMP0022-NOWARN-static) +enable_language(CXX) add_library(foo STATIC empty_vs6_1.cpp) add_library(bar STATIC empty_vs6_2.cpp) diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake index c5d3c29d9f..7356e29d34 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake @@ -1,5 +1,5 @@ -project(CMP0022-WARN-empty-old) +enable_language(CXX) add_library(foo SHARED empty_vs6_1.cpp) add_library(bar SHARED empty_vs6_2.cpp) diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-static.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN-static.cmake index b3cb13160a..0ea4fe5a50 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-static.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-static.cmake @@ -1,5 +1,5 @@ -project(CMP0022-WARN) +enable_language(CXX) add_library(foo STATIC empty_vs6_1.cpp) add_library(bar STATIC empty_vs6_2.cpp) diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake index 03223e86a1..ba207db78a 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake @@ -1,5 +1,5 @@ -project(CMP0022-WARN-tll) +enable_language(CXX) add_library(foo SHARED empty_vs6_1.cpp) add_library(bar SHARED empty_vs6_2.cpp) diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake index e3552b2f04..38adccaef5 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake @@ -1,5 +1,5 @@ -project(CMP0022-WARN) +enable_language(CXX) cmake_policy(SET CMP0042 NEW) diff --git a/Tests/RunCMake/CMP0022/CMP0022-export.cmake b/Tests/RunCMake/CMP0022/CMP0022-export.cmake index 06147f39ee..e121b53626 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-export.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-export.cmake @@ -1,5 +1,5 @@ -project(cmp0022NEW) +enable_language(CXX) cmake_policy(SET CMP0022 NEW) diff --git a/Tests/RunCMake/CMP0022/CMP0022-install-export.cmake b/Tests/RunCMake/CMP0022/CMP0022-install-export.cmake index 171febe3a6..532e204b8f 100644 --- a/Tests/RunCMake/CMP0022/CMP0022-install-export.cmake +++ b/Tests/RunCMake/CMP0022/CMP0022-install-export.cmake @@ -1,5 +1,5 @@ -project(cmp0022NEW) +enable_language(CXX) cmake_policy(SET CMP0022 NEW) diff --git a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt index bd7fdd1b0c..e82802852f 100644 --- a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt +++ b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) if(RunCMake_TEST STREQUAL "CMP0044-WARN") - cmake_policy(VERSION 2.8.11) # old enough to not set CMP0044 + cmake_policy(VERSION 2.8.12) # old enough to not set CMP0044 endif() project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake index b42e933d67..2fafdab2eb 100644 --- a/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake +++ b/Tests/RunCMake/XcodeProject/LinkBinariesBuildPhase.cmake @@ -45,6 +45,7 @@ endforeach() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalFrameworks/CMakeLists.txt [[ +cmake_minimum_required(VERSION 3.31) project(ExternalFrameworks) add_library(staticFrameworkExt STATIC func6.c) add_library(sharedFrameworkExt SHARED func7.c) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2.cmake index f8b354690c..f87a684991 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2.cmake @@ -1,5 +1,5 @@ -project(CMP0022-WARN) +enable_language(CXX) cmake_policy(SET CMP0023 NEW) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-NEW.cmake index f0aa63fbd4..211029bf93 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW.cmake @@ -1,5 +1,5 @@ -project(CMP0022-WARN) +enable_language(CXX) cmake_policy(SET CMP0023 NEW) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake index a5bf2fbb55..a175a6118c 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake @@ -1,5 +1,5 @@ cmake_policy(VERSION 2.8.11) -project(CMP0022-WARN) +enable_language(CXX) add_library(foo SHARED empty_vs6_1.cpp) add_library(bar SHARED empty_vs6_2.cpp) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake index d6f34a1d8d..7fbb70e3bb 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake @@ -1,5 +1,5 @@ cmake_policy(VERSION 2.8.11) -project(CMP0022-WARN) +enable_language(CXX) add_library(foo SHARED empty_vs6_1.cpp) add_library(bar SHARED empty_vs6_2.cpp) diff --git a/Tests/SBCS/CMakeLists.txt b/Tests/SBCS/CMakeLists.txt index b3c3c2cfcb..12905d8135 100644 --- a/Tests/SBCS/CMakeLists.txt +++ b/Tests/SBCS/CMakeLists.txt @@ -1,4 +1,4 @@ -# a SBCS test case +cmake_minimum_required(VERSION 3.10) project (SBCS) add_definitions(-D_SBCS) diff --git a/Tests/VSExternalInclude/Lib1/CMakeLists.txt b/Tests/VSExternalInclude/Lib1/CMakeLists.txt index 9dfac8616e..333acd1c3b 100644 --- a/Tests/VSExternalInclude/Lib1/CMakeLists.txt +++ b/Tests/VSExternalInclude/Lib1/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) set(CMAKE_SUPPRESS_REGENERATION 1) project(LIB1) diff --git a/Tests/VSExternalInclude/Lib2/CMakeLists.txt b/Tests/VSExternalInclude/Lib2/CMakeLists.txt index f4513548dd..9d5ce108a4 100644 --- a/Tests/VSExternalInclude/Lib2/CMakeLists.txt +++ b/Tests/VSExternalInclude/Lib2/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.10) set(CMAKE_SUPPRESS_REGENERATION 1) project(VSEXTERNAL_LIB2)