File tree 1 file changed +4
-22
lines changed
1 file changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -397,12 +397,7 @@ CPMAddPackage("gh:jbeder/yaml-cpp#yaml-cpp-0.6.3@0.6.3")
397
397
### [ nlohmann/json] ( https://github.com/nlohmann/json )
398
398
399
399
``` cmake
400
- CPMAddPackage(
401
- NAME nlohmann_json
402
- VERSION 3.9.1
403
- GITHUB_REPOSITORY nlohmann/json
404
- OPTIONS
405
- "JSON_BuildTests OFF"
400
+ CPMAddPackage("gh:nlohmann/json@3.9.1" OPTIONS "JSON_BuildTests OFF")
406
401
)
407
402
```
408
403
@@ -431,22 +426,14 @@ For a working example of using CPM to download and configure the Boost C++ Libra
431
426
432
427
``` cmake
433
428
# the install option has to be explicitly set to allow installation
434
- CPMAddPackage(
435
- GITHUB_REPOSITORY jarro2783/cxxopts
436
- VERSION 2.2.1
437
- OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
429
+ CPMAddPackage("gh:jarro2783/cxxopts@2.2.1" OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
438
430
)
439
431
```
440
432
441
433
### [ google/benchmark] ( https://github.com/google/benchmark )
442
434
443
435
``` cmake
444
- CPMAddPackage(
445
- NAME benchmark
446
- GITHUB_REPOSITORY google/benchmark
447
- VERSION 1.5.2
448
- OPTIONS "BENCHMARK_ENABLE_TESTING Off"
449
- )
436
+ CPMAddPackage("gh:google/benchmark@1.5.2" OPTIONS "BENCHMARK_ENABLE_TESTING Off")
450
437
451
438
if(benchmark_ADDED)
452
439
# enable c++11 to avoid compilation errors
@@ -457,12 +444,7 @@ endif()
457
444
### [ Lua] ( https://www.lua.org )
458
445
459
446
``` cmake
460
- CPMAddPackage(
461
- NAME lua
462
- GIT_REPOSITORY https://github.com/lua/lua.git
463
- VERSION 5.3.5
464
- DOWNLOAD_ONLY YES
465
- )
447
+ CPMAddPackage("gh:lua/lua@5.3.5" DOWNLOAD_ONLY YES)
466
448
467
449
if (lua_ADDED)
468
450
# lua has no CMake support, so we create our own target
You can’t perform that action at this time.
0 commit comments