How it works

This recipe highlighted some new options to the ExternalProject_Add command:

  1. GIT_REPOSITORY: This can be used to specify the URL of the repository containing the sources of our dependency. CMake can also use other version control systems, such as CVS (CVS_REPOSITORY), SVN (SVN_REPOSITORY), or Mercurial (HG_REPOSITORY).
  1. GIT_TAG: By default, CMake will check out the default branch of the given repository. However, it is preferable to depend on a well-defined version that is known to be stable. This can be specified with this option, which can accept any identifier recognized by Git as "version" information, such as a Git commit SHA, a Git tag, or just a branch name. Similar options are also available for the other version control ...

Get CMake Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.