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