[CMake] ExternalProject_Add and Git Update? How do I make these work?
Michael Jackson
mike.jackson at bluequartz.net
Fri Dec 22 14:51:09 EST 2017
ExternalProject_Add(${extProjectName}
GIT_REPOSITORY "git://github.com/BlueQuartzSoftware/discount.git"
GIT_PROGRESS 1
#GIT_TAG master
TMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/tmp/${CMAKE_BUILD_TYPE}"
STAMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Stamp"
DOWNLOAD_DIR ${DREAM3D_SDK}/superbuild/${extProjectName}/Download
SOURCE_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Source"
BINARY_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Build/${CMAKE_BUILD_TYPE}"
INSTALL_DIR "${DREAM3D_SDK}/${extProjectName}-${discount_VERSION}-${CMAKE_BUILD_TYPE}"
#UPDATE_COMMAND "${GIT_EXECUTABLE} pull --rebase origin master"
PATCH_COMMAND ""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
LOG_DOWNLOAD 1
LOG_UPDATE 1
LOG_CONFIGURE 1
LOG_BUILD 1
LOG_TEST 1
LOG_INSTALL 1
)
The above is my cmake code. This worked great the first time through. Then I discovered an issue in the project that I was cloning (discount) and fixed it and pushed it. Now the repository at GitHub is a few commits ahead of what I have. So I rerun CMake and then "ninja" and I get an error when the "update" command is run:
Cannot rebase: You have unstaged changes.
Please commit or stash them.
No rebase in progress?
CMake Error at /Users/Shared/DREAM3D_SDK/superbuild/discount/tmp/Debug/discount-gitupdate.cmake:105 (message):
Failed to rebase in:
'/Users/Shared/DREAM3D_SDK/superbuild/discount/Source/'.
You will have to resolve the conflicts manually
Doing a "git status" in the "Source" directory gives this:
[mjackson at ferb:Source]$ git status
On branch master
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Untracked files:
(use "git add <file>..." to include in what will be committed)
"tests/mu\303\261oz.t"
nothing added to commit but untracked files present (use "git add" to track)
There was something funning with the file that is untracked. Not sure if this is causing the issues?
--
Michael Jackson | Owner, President
BlueQuartz Software
[e] mike.jackson at bluequartz.net
[w] www.bluequartz.net
More information about the CMake
mailing list