Reputation: 2064
I want CMake to git clone a header only library without building it. I tried:
ExternalProject_Add(eigen
GIT_REPOSITORY https://github.com/eigenteam/eigen-git-mirror.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
GIT_SHALLOW 1)
But that builds the external project. How to git clone without building?
Upvotes: 2
Views: 4515
Reputation: 2329
According to the documentation, you need to:
CONFIGURE_COMMAND
parameter as an empty string (i.e. ""
) in order to stop the CMake configuration (the project is assumed to be CMake-base by default).BUILD_COMMAND
parameter as an empty string to disable the build step.INSTALL_COMMAND
parameter as an empty string to force the install step to do nothing.However, if there are no complicated conditions for the inclusion of Eigen, i.e. it is always a required component for your project, you might need to consider the use of git submodules (this might be a better approach even if Eigen is not a mandatory requirement).
Upvotes: 3