Skip to content

Commit 92ef184

Browse files
committed
fix: use shorthand syntax in examples
1 parent b2a1bca commit 92ef184

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,8 @@ CPMAddPackage("gh:jbeder/yaml-cpp#yaml-cpp-0.6.3@0.6.3")
403403
### [nlohmann/json](https://github.com/nlohmann/json)
404404

405405
```cmake
406-
CPMAddPackage(
407-
NAME nlohmann_json
408-
VERSION 3.9.1
409-
GITHUB_REPOSITORY nlohmann/json
410-
OPTIONS
411-
"JSON_BuildTests OFF"
406+
CPMAddPackage("gh:nlohmann/json@3.9.1"
407+
OPTIONS "JSON_BuildTests OFF"
412408
)
413409
```
414410

@@ -438,8 +434,7 @@ For a working example of using CPM to download and configure the Boost C++ Libra
438434
```cmake
439435
# the install option has to be explicitly set to allow installation
440436
CPMAddPackage(
441-
GITHUB_REPOSITORY jarro2783/cxxopts
442-
VERSION 2.2.1
437+
URI "gh:jarro2783/cxxopts@2.2.1"
443438
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
444439
)
445440
```
@@ -448,9 +443,7 @@ CPMAddPackage(
448443

449444
```cmake
450445
CPMAddPackage(
451-
NAME benchmark
452-
GITHUB_REPOSITORY google/benchmark
453-
VERSION 1.5.2
446+
URI "gh:google/benchmark@1.5.2"
454447
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
455448
)
456449
@@ -464,9 +457,7 @@ endif()
464457

465458
```cmake
466459
CPMAddPackage(
467-
NAME lua
468-
GIT_REPOSITORY https://github.com/lua/lua.git
469-
VERSION 5.3.5
460+
URI "gh:lua/lua@5.3.5"
470461
DOWNLOAD_ONLY YES
471462
)
472463

0 commit comments

Comments
 (0)