Skip to content

Commit 03c08f3

Browse files
committed
fix: use shorthand syntax in examples
1 parent 5913685 commit 03c08f3

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,8 @@ CPMAddPackage("gh:jbeder/yaml-cpp#[email protected]")
411411
### [nlohmann/json](https://github.com/nlohmann/json)
412412

413413
```cmake
414-
CPMAddPackage(
415-
NAME nlohmann_json
416-
VERSION 3.9.1
417-
GITHUB_REPOSITORY nlohmann/json
418-
OPTIONS
419-
"JSON_BuildTests OFF"
414+
CPMAddPackage("gh:nlohmann/[email protected]"
415+
OPTIONS "JSON_BuildTests OFF"
420416
)
421417
```
422418

@@ -446,8 +442,7 @@ For a working example of using CPM to download and configure the Boost C++ Libra
446442
```cmake
447443
# the install option has to be explicitly set to allow installation
448444
CPMAddPackage(
449-
GITHUB_REPOSITORY jarro2783/cxxopts
450-
VERSION 2.2.1
445+
URI "gh:jarro2783/[email protected]"
451446
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
452447
)
453448
```
@@ -456,9 +451,7 @@ CPMAddPackage(
456451

457452
```cmake
458453
CPMAddPackage(
459-
NAME benchmark
460-
GITHUB_REPOSITORY google/benchmark
461-
VERSION 1.5.2
454+
URI "gh:google/[email protected]"
462455
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
463456
)
464457

0 commit comments

Comments
 (0)