Skip to content

Commit 6fd2dde

Browse files
committed
fix: use shorthand syntax in examples
1 parent 5a7b584 commit 6fd2dde

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

README.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,8 @@ CPMAddPackage("gh:jbeder/yaml-cpp#[email protected]")
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/[email protected]"
407+
OPTIONS "JSON_BuildTests OFF"
412408
)
413409
```
414410

@@ -437,20 +433,15 @@ For a working example of using CPM to download and configure the Boost C++ Libra
437433

438434
```cmake
439435
# the install option has to be explicitly set to allow installation
440-
CPMAddPackage(
441-
GITHUB_REPOSITORY jarro2783/cxxopts
442-
VERSION 2.2.1
443-
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
436+
CPMAddPackage("gh:jarro2783/[email protected]"
437+
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
444438
)
445439
```
446440

447441
### [google/benchmark](https://github.com/google/benchmark)
448442

449443
```cmake
450-
CPMAddPackage(
451-
NAME benchmark
452-
GITHUB_REPOSITORY google/benchmark
453-
VERSION 1.5.2
444+
CPMAddPackage("gh:google/[email protected]"
454445
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
455446
)
456447
@@ -463,11 +454,8 @@ endif()
463454
### [Lua](https://www.lua.org)
464455

465456
```cmake
466-
CPMAddPackage(
467-
NAME lua
468-
GIT_REPOSITORY https://github.com/lua/lua.git
469-
VERSION 5.3.5
470-
DOWNLOAD_ONLY YES
457+
CPMAddPackage("gh:lua/[email protected]"
458+
DOWNLOAD_ONLY YES
471459
)
472460
473461
if (lua_ADDED)

0 commit comments

Comments
 (0)