From 78225c9a3506520566cd3f878d579dbf4a9073a0 Mon Sep 17 00:00:00 2001 From: Jonah Beckford <9566106-jonahbeckford@users.noreply.gitlab.com> Date: Sun, 10 Nov 2024 16:01:43 -0800 Subject: [PATCH] Add OVERRIDE_DKSDK_VERSION option --- cmake/scripts/dksdk/project/get.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/scripts/dksdk/project/get.cmake b/cmake/scripts/dksdk/project/get.cmake index 6bd93f3..fdb69fb 100644 --- a/cmake/scripts/dksdk/project/get.cmake +++ b/cmake/scripts/dksdk/project/get.cmake @@ -97,6 +97,10 @@ ONLY_DKSDK_VERSION Only fetch enough dependencies to calculate the DkSDK version accurately. Currently the dksdk-cmake dependency is the only dependency needed. +OVERRIDE_DKSDK_VERSION must be in the Major.Minor.Patch format. + NONINTERACTIVE Best effort attempt to stop `git` and any other source fetching tools from asking interactive questions like username/password prompts. Use when @@ -109,7 +113,7 @@ endfunction() function(dksdk_project_get) set(noValues NONINTERACTIVE SANDBOX ONLY_DKSDK_VERSION) - set(singleValues LOG_LEVEL FETCH_DIR CONFIG_FILE SOURCE_DIR DKSDK_CMAKE_GITREF) + set(singleValues LOG_LEVEL FETCH_DIR CONFIG_FILE SOURCE_DIR DKSDK_CMAKE_GITREF OVERRIDE_DKSDK_VERSION) set(multiValues) cmake_parse_arguments(PARSE_ARGV 0 ARG "${noValues}" "${singleValues}" "${multiValues}") @@ -134,6 +138,9 @@ function(dksdk_project_get) if(ARG_ONLY_DKSDK_VERSION) list(APPEND get_OPTS -D ONLY_DKSDK_VERSION=1) endif() + if(ARG_OVERRIDE_DKSDK_VERSION) + list(APPEND get_OPTS -D "OVERRIDE_DKSDK_VERSION=${OVERRIDE_DKSDK_VERSION}") + endif() if(ARG_DKSDK_CMAKE_GITREF) list(APPEND get_OPTS -D "DKSDK_CMAKE_GITREF=${DKSDK_CMAKE_GITREF}") endif()