1

I'm trying to use CMake v3.7's ExternalProject to clone the GSL git repo, but it's failing with the error "Failed to unstash changes". Does anyone know what's happening? Am I doing something wrong? Is CMake or GSL doing something wrong?

ExternalProject_Add(
    gsl
    GIT_REPOSITORY https://github.com/Microsoft/GSL.git
    CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
)
einpoklum
  • 118,144
  • 57
  • 340
  • 684
Jeff M
  • 2,492
  • 3
  • 22
  • 38
  • Looks like you have modified download directory somehow. After such error, run `git status` in the `gsl-prefix/src/` (or `gsl-prefix/src/gsl`) and see whether directory is clean. – Tsyvarev Nov 10 '16 at 17:56
  • 1
    Partly yes, partly no. Partly yes because a submodule within a submodule has been modified (https://imgur.com/a/xYSDX). But also partly no because I'm not modifying anything. Besides include ExternalProject and add_executable main, the code above is literally all I'm running. – Jeff M Nov 10 '16 at 18:08
  • `tests/unittest-cpp` is actually a *git submodule*. May be your problem is somehow related with that: CMake attempt to update submodule, but because it is in detached state (commit is fixed), CMake fails. I don't know how to overcome this. – Tsyvarev Nov 10 '16 at 18:32

0 Answers0