Add fmt example and document version from git tag (#100)

* add VERSION_PREFIX argument

* add fmt example

* add VERSION_PREFIX note to readme

* rollback, add info about determining version from git tag

* rollback version
This commit is contained in:
Lars Melchior
2020-03-16 20:00:30 +01:00
committed by GitHub
parent 01b69aad82
commit cea81872cf
5 changed files with 27 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ CPMAddPackage(
The origin may be specified by a `GIT_REPOSITORY`, but other sources, such as direct URLs, are [also supported](https://cmake.org/cmake/help/v3.11/module/ExternalProject.html#external-project-definition).
If `GIT_TAG` hasn't been explicitly specified it defaults to `v(VERSION)`, a common convention for git projects.
On the other hand, if `VERSION` hasn't been explicitly specified, CPM can automatically identify the version from the git tag in some common cases.
`GIT_TAG` can also be set to a specific commit or a branch name such as `master` to always download the most recent version.
The optional argument `FIND_PACKAGE_ARGUMENTS` can be specified to a string of parameters that will be passed to `find_package` if enabled (see below).