diff --git a/config/modules/Findtblite.cmake b/config/modules/Findtblite.cmake index f8fbf600..eb399f83 100644 --- a/config/modules/Findtblite.cmake +++ b/config/modules/Findtblite.cmake @@ -16,7 +16,9 @@ set(_lib "tblite") set(_pkg "TBLITE") -set(_url "https://github.com/tblite/tblite") +#set(_url "https://github.com/tblite/tblite") +set(_url "https://github.com/pprcht/tblite") +set(_branch "xtb_solvation") if(NOT DEFINED "${_pkg}_FIND_METHOD") set("${_pkg}_FIND_METHOD" "subproject" "cmake" "fetch" "pkgconf") @@ -27,7 +29,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/crest-utils.cmake") set(temp_with_tests ${WITH_TESTS}) # Save the current value of WITH_TESTS set(WITH_TESTS FALSE CACHE BOOL "Temporarily disable tests for the tblite subproject" FORCE) set(WITH_API FALSE) -crest_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}") +crest_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}" "${_branch}") set(found FALSE) if(TARGET "tblite::tblite") diff --git a/config/modules/crest-utils.cmake b/config/modules/crest-utils.cmake index 375714a2..340d26e4 100644 --- a/config/modules/crest-utils.cmake +++ b/config/modules/crest-utils.cmake @@ -24,10 +24,16 @@ macro( methods url ) + + if(NOT DEFINED ARGV3) + set(branch "HEAD") # Default to HEAD if branch is not provided + else() + set(branch "${ARGV3}") # Use the provided branch + endif() + string(TOLOWER "${package}" _pkg_lc) string(TOUPPER "${package}" _pkg_uc) - # iterate through lookup types in order foreach(method ${methods}) @@ -112,7 +118,7 @@ macro( FetchContent_Declare( "${_pkg_lc}" GIT_REPOSITORY "${url}" - GIT_TAG "HEAD" + GIT_TAG "${branch}" ) FetchContent_MakeAvailable("${_pkg_lc}")