Tests/ExternalProject: Update sample projects to require CMake 3.31

This commit is contained in:
Brad King
2024-11-20 10:54:01 -05:00
parent 0d416ad57f
commit cde63efaea
20 changed files with 36 additions and 33 deletions
+17 -17
View File
@@ -168,7 +168,7 @@ if(EP_TEST_CVS)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
SOURCE_DIR ${local_cvs_repo} SOURCE_DIR ${local_cvs_repo}
URL ${CMAKE_CURRENT_SOURCE_DIR}/cvsrepo.tgz URL ${CMAKE_CURRENT_SOURCE_DIR}/cvsrepo.tgz
URL_MD5 55fc85825ffdd9ed2597123c68b79f7e URL_MD5 287399370738adfe932e036cbe38d5b0
BUILD_COMMAND "" BUILD_COMMAND ""
CONFIGURE_COMMAND "${CVS_EXECUTABLE}" --version CONFIGURE_COMMAND "${CVS_EXECUTABLE}" --version
INSTALL_COMMAND "" INSTALL_COMMAND ""
@@ -190,11 +190,11 @@ if(EP_TEST_CVS)
# CVS by date stamp: # CVS by date stamp:
# #
set(proj TutorialStep1-CVS-20090626) set(proj TutorialStep1-CVS-20241115)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
CVS_REPOSITORY ":local:${local_cvs_repo}" CVS_REPOSITORY ":local:${local_cvs_repo}"
CVS_MODULE "TutorialStep1" CVS_MODULE "TutorialStep1"
CVS_TAG "-D2009-06-26 16:50:00 UTC" CVS_TAG "-D2024-11-15 23:11:00 UTC"
UPDATE_COMMAND "" UPDATE_COMMAND ""
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -229,7 +229,7 @@ if(EP_TEST_CVS)
INSTALL_COMMAND "" INSTALL_COMMAND ""
DEPENDS "SetupLocalCVSRepository" DEPENDS "SetupLocalCVSRepository"
DEPENDS "EmptyNoOpProject" DEPENDS "EmptyNoOpProject"
DEPENDS "TutorialStep1-CVS-20090626" DEPENDS "TutorialStep1-CVS-20241115"
DEPENDS "TutorialStep1-CVS-testtag1" DEPENDS "TutorialStep1-CVS-testtag1"
) )
set_property(TARGET ${proj} PROPERTY FOLDER "CVS") set_property(TARGET ${proj} PROPERTY FOLDER "CVS")
@@ -248,7 +248,7 @@ if(EP_TEST_SVN)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
SOURCE_DIR ${local_svn_repo} SOURCE_DIR ${local_svn_repo}
URL ${CMAKE_CURRENT_SOURCE_DIR}/svnrepo.tgz URL ${CMAKE_CURRENT_SOURCE_DIR}/svnrepo.tgz
URL_MD5 2f468be4ed1fa96377fca0cc830819c4 URL_MD5 0d75c80611c998e36c36f4a9e1e739d0
BUILD_COMMAND "" BUILD_COMMAND ""
CONFIGURE_COMMAND "${Subversion_SVN_EXECUTABLE}" --version CONFIGURE_COMMAND "${Subversion_SVN_EXECUTABLE}" --version
INSTALL_COMMAND "" INSTALL_COMMAND ""
@@ -258,10 +258,10 @@ if(EP_TEST_SVN)
# SVN by date stamp: # SVN by date stamp:
# #
set(proj TutorialStep1-SVN-20090626) set(proj TutorialStep1-SVN-20241115)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
SVN_REPOSITORY "${local_svn_repo_url}" 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 "" UPDATE_COMMAND ""
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -272,10 +272,10 @@ if(EP_TEST_SVN)
# SVN by revision number: # SVN by revision number:
# #
set(proj TutorialStep1-SVN-r2) set(proj TutorialStep1-SVN-r3)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
SVN_REPOSITORY "${local_svn_repo_url}" SVN_REPOSITORY "${local_svn_repo_url}"
SVN_REVISION "-r2" SVN_REVISION "-r3"
UPDATE_COMMAND "" UPDATE_COMMAND ""
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -320,7 +320,7 @@ if(EP_TEST_GIT)
set(proj TutorialStep1-GIT-byhash) set(proj TutorialStep1-GIT-byhash)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
GIT_REPOSITORY "${local_git_repo}" GIT_REPOSITORY "${local_git_repo}"
GIT_TAG 57418671a0a0e371e7bac532337152595fbe0df5 # generated by gitrepo.bash GIT_TAG 4ed00009457732fc8b6d75f6159bbc384119c3d1 # generated by gitrepo.bash
UPDATE_COMMAND "" UPDATE_COMMAND ""
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -568,7 +568,7 @@ if(EP_TEST_HG)
set(proj TutorialStep1-HG-byhash) set(proj TutorialStep1-HG-byhash)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
HG_REPOSITORY "${local_hg_repo}" HG_REPOSITORY "${local_hg_repo}"
HG_TAG dd2ce38a6b8a HG_TAG fc5a0c915390
UPDATE_COMMAND "" UPDATE_COMMAND ""
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -621,8 +621,8 @@ enable_testing()
# BuildTree tests: # BuildTree tests:
# #
if(EP_TEST_CVS) if(EP_TEST_CVS)
add_test(TutorialStep1-CVS-20090626-BuildTreeTest add_test(TutorialStep1-CVS-20241115-BuildTreeTest
"${binary_base}/TutorialStep1-CVS-20090626/Tutorial" 4) "${binary_base}/TutorialStep1-CVS-20241115/Tutorial" 4)
add_test(TutorialStep1-CVS-testtag1-BuildTreeTest add_test(TutorialStep1-CVS-testtag1-BuildTreeTest
"${binary_base}/TutorialStep1-CVS-testtag1/Tutorial" 64) "${binary_base}/TutorialStep1-CVS-testtag1/Tutorial" 64)
@@ -632,11 +632,11 @@ if(EP_TEST_CVS)
endif() endif()
if(EP_TEST_SVN) if(EP_TEST_SVN)
add_test(TutorialStep1-SVN-20090626-BuildTreeTest add_test(TutorialStep1-SVN-20241115-BuildTreeTest
"${binary_base}/TutorialStep1-SVN-20090626/Tutorial" 100) "${binary_base}/TutorialStep1-SVN-20241115/Tutorial" 100)
add_test(TutorialStep1-SVN-r2-BuildTreeTest add_test(TutorialStep1-SVN-r3-BuildTreeTest
"${binary_base}/TutorialStep1-SVN-r2/Tutorial" 99) "${binary_base}/TutorialStep1-SVN-r3/Tutorial" 99)
add_test(TutorialStep1-SVN-trunk-BuildTreeTest add_test(TutorialStep1-SVN-trunk-BuildTreeTest
"${binary_base}/TutorialStep1-SVN-trunk/Tutorial" 98) "${binary_base}/TutorialStep1-SVN-trunk/Tutorial" 98)
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5 -2
View File
@@ -13,6 +13,9 @@ export GIT_AUTHOR_NAME='testauthor'
export GIT_AUTHOR_EMAIL='testauthor@cmake.org' export GIT_AUTHOR_EMAIL='testauthor@cmake.org'
export GIT_COMMITTER_NAME='testauthor' export GIT_COMMITTER_NAME='testauthor'
export GIT_COMMITTER_EMAIL='testauthor@cmake.org' 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" cd "$tmpdir"
@@ -23,7 +26,7 @@ rm -f gitrepo.git/hooks/*.sample
mkdir gitrepo mkdir gitrepo
cd gitrepo cd gitrepo
git init -b "$defaultBranch" git init -b "$defaultBranch"
echo 'cmake_minimum_required(VERSION 3.19) echo 'cmake_minimum_required(VERSION 3.31)
project(Example NONE) project(Example NONE)
add_custom_target(example ALL add_custom_target(example ALL
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/example.cmake.in example.cmake 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 mkdir gitrepo-sub
cd gitrepo-sub cd gitrepo-sub
git init -b "$defaultBranch" git init -b "$defaultBranch"
echo 'cmake_minimum_required(VERSION 3.19) echo 'cmake_minimum_required(VERSION 3.31)
project(ExampleWithSub NONE) project(ExampleWithSub NONE)
file(STRINGS "${CMAKE_SOURCE_DIR}/.git/config" git_config_strings file(STRINGS "${CMAKE_SOURCE_DIR}/.git/config" git_config_strings
REGEX "^\\[submodule") REGEX "^\\[submodule")
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -79,7 +79,7 @@ set_property(TARGET ${proj} PROPERTY FOLDER "Local")
set(proj TutorialStep1-LocalTAR) set(proj TutorialStep1-LocalTAR)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tar" URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tar"
URL_MD5 a87c5b47c0201c09ddfe1d5738fdb1e3 URL_MD5 e3774630066d0df5b9074cb777d72802
LIST_SEPARATOR :: LIST_SEPARATOR ::
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Step1Patch.cmake PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Step1Patch.cmake
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
@@ -94,7 +94,7 @@ set_property(TARGET ${proj} PROPERTY FOLDER "Local/TAR")
set(proj TutorialStep1-LocalNoDirTAR) set(proj TutorialStep1-LocalNoDirTAR)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tar" URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tar"
URL_MD5 d09e3d370c5c908fa035c30939ee438e URL_MD5 a7357d2e8a52cc807957634ea135eb31
LIST_SEPARATOR @@ LIST_SEPARATOR @@
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
-DTEST_LIST:STRING=1@@2@@3 -DTEST_LIST:STRING=1@@2@@3
@@ -115,7 +115,7 @@ ExternalProject_Add_Step(${proj} mypatch
set(proj TutorialStep1-LocalTGZ) set(proj TutorialStep1-LocalTGZ)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz" URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz"
URL_MD5 38c648e817339c356f6be00eeed79bd0 URL_MD5 c04edffa0520d5468d51ecd13a971828
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
INSTALL_COMMAND "" INSTALL_COMMAND ""
LOG_BUILD 1 LOG_BUILD 1
@@ -126,7 +126,7 @@ set_property(TARGET ${proj} PROPERTY FOLDER "Local/TGZ")
set(proj TutorialStep1-LocalNoDirTGZ) set(proj TutorialStep1-LocalNoDirTGZ)
ExternalProject_Add(${proj} ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tgz" URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tgz"
URL_HASH SHA256=496229e2a5ed620a37c385ad9406004a18026beab8b55dd2c4565d4b7f1d5383 URL_HASH SHA256=b9aff8a865842b21cb3bc2ec8bed426b46ef560518962a81242c7f2e089c00de
CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
INSTALL_COMMAND "" INSTALL_COMMAND ""
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.31)
project (Tutorial) project (Tutorial)
# The version number. # The version number.
@@ -189,16 +189,16 @@ endif()
file(REMOVE_RECURSE ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals) file(REMOVE_RECURSE ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals)
if(do_git_tests) if(do_git_tests)
check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 REBASE) check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 REBASE)
check_a_tag(tag1 d1970730310fe8bc07e73f15dc570071f9f9654a 1 0 REBASE) check_a_tag(tag1 4209914b424925d6f1b558d79454d60967d4b0f3 1 0 REBASE)
# With the Git UPDATE_COMMAND performance patch, this will not require a # With the Git UPDATE_COMMAND performance patch, this will not require a
# 'git fetch' # 'git fetch'
check_a_tag(tag1 d1970730310fe8bc07e73f15dc570071f9f9654a 0 0 REBASE) check_a_tag(tag1 4209914b424925d6f1b558d79454d60967d4b0f3 0 0 REBASE)
check_a_tag(tag2 5842b503ba4113976d9bb28d57b5aee1ad2736b7 1 0 REBASE) check_a_tag(tag2 ae72641040f1c9512f152d08afb6909f0498f958 1 0 REBASE)
check_a_tag(d19707303 d1970730310fe8bc07e73f15dc570071f9f9654a 0 0 REBASE) check_a_tag(4209914b42 4209914b424925d6f1b558d79454d60967d4b0f3 0 0 REBASE)
check_a_tag(origin/master b5752a26ae448410926b35c275af3c192a53722e 1 1 REBASE) check_a_tag(origin/master b5f0fc2d442b72dd29e655c329af0062e1f8d129 1 1 REBASE)
# This is a remote symbolic ref, so it will always trigger a 'git fetch' # 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) foreach(strategy IN ITEMS CHECKOUT REBASE_CHECKOUT)
# Move local master back, then apply a change that will cause a conflict # 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.") message(FATAL_ERROR "Could not commit conflicting change.")
endif() endif()
# This should discard our commit but leave behind an annotated tag # 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() endforeach()
# This file matches a .gitignore rule that the last commit defines. We can't # 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. # doesn't choke on it.
set(ignoredFile ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals/Source/TutorialStep1-GIT/ignored_item) set(ignoredFile ${ExternalProjectUpdate_BINARY_DIR}/CMakeExternals/Source/TutorialStep1-GIT/ignored_item)
file(TOUCH ${ignoredFile}) 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}) if(NOT EXISTS ${ignoredFile})
message(FATAL_ERROR "Ignored file is missing") message(FATAL_ERROR "Ignored file is missing")
endif() endif()
Binary file not shown.