[CMake] ExternalProject_Add and Git Update? How do I make these work?

Kris Thielemans kris.f.thielemans at gmail.com
Sat Dec 23 03:03:43 EST 2017


Hi

The strange thing here is

Cannot rebase: You have unstaged changes.
Please commit or stash them.
No rebase in progress?

Why would it be rebasing? Maybe a local config setting that a pull is always
pull --rebase? In any case, my guess is that your discount/Source is in a
funny state compare to the github version. Try a "git pull" there manually
to see what happens then.

HTH
kris

-----Original Message-----
From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Michael Jackson
Sent: 22 December 2017 19:51
To: CMake Mail List <cmake at cmake.org>
Subject: [CMake] ExternalProject_Add and Git Update? How do I make these
work?

ExternalProject_Add(${extProjectName}
  GIT_REPOSITORY "g
it://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.c
make: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


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list