Skip to content

Commit

Permalink
Add OVERRIDE_DKSDK_VERSION option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonah Beckford committed Nov 11, 2024
1 parent 71d47cd commit 78225c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/scripts/dksdk/project/get.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version
Specify the DkSDK version rather than interrogating the dksdk-cmake
dependency. The <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
Expand All @@ -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}")

Expand All @@ -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()
Expand Down

0 comments on commit 78225c9

Please sign in to comment.