Skip to content
Snippets Groups Projects
Commit 56d02e0e authored by Administrator's avatar Administrator
Browse files

Allow to remove local changes in external git projects

before getting updates from the external repository.


git-svn-id: https://subversion.gsi.de/cbmsoft/cbmroot/trunk@13978 5a1b234a-d7ce-0410-9a93-fd649a8fa65c
parent 5b901f4e
No related branches found
No related tags found
No related merge requests found
......@@ -120,7 +120,7 @@ EndMacro(Gen_Exe_Script)
function(download_project_if_needed)
include(DownloadProject)
set(oneValueArgs PROJECT GIT_REPOSITORY GIT_TAG SOURCE_DIR TEST_FILE)
set(oneValueArgs PROJECT GIT_REPOSITORY GIT_TAG GIT_STASH SOURCE_DIR TEST_FILE)
cmake_parse_arguments(MY "" "${oneValueArgs}"
"" ${ARGN} )
......@@ -139,6 +139,10 @@ function(download_project_if_needed)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
If(NOT ${MY_GIT_TAG} STREQUAL ${CURRENT_SPADIC_HASH})
If(MY_GIT_STASH)
Execute_Process(COMMAND git stash WORKING_DIRECTORY ${MY_SOURCE_DIR})
Execute_Process(COMMAND git stash clear WORKING_DIRECTORY ${MY_SOURCE_DIR})
EndIF()
download_project(PROJ ${MY_PROJECT}
GIT_REPOSITORY ${MY_GIT_REPOSITORY}
GIT_TAG ${MY_GIT_TAG}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment