File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,9 @@ The following cache variables may be set to influence the library detection:
371371``TEST_DRIVE_SUBPROJECT``
372372 Directory to find the test-drive subproject, relative to the project root
373373
374+ ``TEST_DRIVE_GIT_TAG``
375+ The tag to use if fetching from git.
376+
374377#]]
375378
376379set(_lib "test-drive")
@@ -453,12 +456,16 @@ foreach(method ${${_pkg}_FIND_METHOD})
453456 endif()
454457
455458 if("${method}" STREQUAL "fetch")
456- message(STATUS "Retrieving ${_lib} from ${_url}")
459+ if(NOT DEFINED "${_pkg}_GIT_TAG")
460+ set("_${_pkg}_GIT_TAG")
461+ set("${_pkg}_GIT_TAG" "HEAD")
462+ endif()
463+ message(STATUS "Retrieving ${_lib} from ${_url} with tag ${${_pkg}_GIT_TAG}")
457464 include(FetchContent)
458465 FetchContent_Declare(
459466 "${_lib}"
460467 GIT_REPOSITORY "${_url}"
461- GIT_TAG "HEAD "
468+ GIT_TAG "${${_pkg}_GIT_TAG} "
462469 )
463470 FetchContent_MakeAvailable("${_lib}")
464471
@@ -483,6 +490,10 @@ else()
483490 set("${_pkg}_FOUND" FALSE)
484491endif()
485492
493+ if(DEFINED "_${_pkg}_GIT_TAG")
494+ unset("${_pkg}_GIT_TAG")
495+ unset("_${_pkg}_GIT_TAG")
496+ endif()
486497if(DEFINED "_${_pkg}_SUBPROJECT")
487498 unset("${_pkg}_SUBPROJECT")
488499 unset("_${_pkg}_SUBPROJECT")
You can’t perform that action at this time.
0 commit comments