[CMake] Visual Studio and ExternalProject_Add

David Cole DLRdave at aol.com
Wed Mar 2 07:30:08 EST 2016


Newer versions of Visual Studio install a git, too, for their source
control integration features. Which git is CMake using, the one you've
installed or the one Visual Studio installed?



On Wed, Mar 2, 2016 at 12:45 AM, Kevin Brightwell
<kevin.brightwell2 at gmail.com> wrote:
> I've been having great success with using ExternalProject over the terrible
> git submodules. However, when using Visual Studio, the following error
> happens:
>
>  Performing download step (git clone) for 'catch-lib'
> 2>  Cloning into 'catch-lib'...
> 2>  Note: checking out 'tags/v1.3.4'.
> 2>
> 2>  You are in 'detached HEAD' state. You can look around, make experimental
> 2>  changes and commit them, and you can discard any commits you make in
> this
> 2>  state without impacting any branches by performing another checkout.
> 2>
> 2>  If you want to create a new branch to retain commits you create, you may
> 2>  do so (now or later) by using -b with the checkout command again.
> Example:
> 2>
> 2>    git checkout -b <new-branch-name>
> 2>
> 2>  HEAD is now at 3b4edd7... Build for v1.3.4
> 2>  fatal: 'submodule' appears to be a git command, but we were not
> 2>  able to execute it. Maybe git-submodule is broken?
> 2>  CMake Error at
> C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 (message):
> 2>    Failed to init submodules in:
> 2>    'C:/Users/kevin/dev/sol2/vendor/src/catch-lib'
>
> The CMake file is located here:
> https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt
>
> Steps I've verified:
>
> git.exe is on my system PATH
> The submodule URL is valid
> Builds on OSX/Linux
> Reinstalled git (twice)
>
> I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure I'm
> missing something along the way.
>
> Thanks,
>
> --
> Kevin Brightwell. BESc., BSc.
> MESc. Candidate 2017
> Western University
>
>
> --
>
> 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:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list