File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ If an additional optional parameter `SYSTEM` is set to a truthy value, the SYSTE
84
84
See the [ add_subdirectory ] ( https://cmake.org/cmake/help/latest/command/add_subdirectory.html?highlight=add_subdirectory )
85
85
and [ SYSTEM] ( https://cmake.org/cmake/help/latest/prop_tgt/SYSTEM.html#prop_tgt:SYSTEM ) target property for details.
86
86
87
- A single-argument compact syntax is also supported:
87
+ A shorthand syntax is also supported:
88
88
89
89
``` cmake
90
90
# A git package from a given uri with a version
@@ -108,6 +108,13 @@ CPMAddPackage("https://example.com/my-package-1.2.3.zip#MD5=68e20f674a48be38d60e
108
108
CPMAddPackage("https://example.com/my-package.zip@1.2.3")
109
109
```
110
110
111
+ Additionally, the shorthand syntax can be combined with the other options from above:
112
+ ``` cmake
113
+ CPMAddPackage("gh:nlohmann/json@3.9.1"
114
+ OPTIONS "JSON_BuildTests OFF"
115
+ )
116
+ ```
117
+
111
118
After calling ` CPMAddPackage ` , the following variables are defined in the local scope, where ` <dependency> ` is the name of the dependency.
112
119
113
120
- ` <dependency>_SOURCE_DIR ` is the path to the source of the dependency.
You can’t perform that action at this time.
0 commit comments