Skip to content

Commit

Permalink
fix: use shorthand syntax in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
SGSSGene committed Mar 26, 2024
1 parent 00ff943 commit 1dfebcd
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,8 @@ CPMAddPackage("gh:jbeder/yaml-cpp#[email protected]")
### [nlohmann/json](https://github.com/nlohmann/json)

```cmake
CPMAddPackage(
NAME nlohmann_json
VERSION 3.9.1
GITHUB_REPOSITORY nlohmann/json
OPTIONS
"JSON_BuildTests OFF"
CPMAddPackage("gh:nlohmann/[email protected]"
OPTIONS "JSON_BuildTests OFF"
)
```

Expand Down Expand Up @@ -431,20 +427,15 @@ For a working example of using CPM to download and configure the Boost C++ Libra

```cmake
# the install option has to be explicitly set to allow installation
CPMAddPackage(
GITHUB_REPOSITORY jarro2783/cxxopts
VERSION 2.2.1
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
CPMAddPackage("gh:jarro2783/[email protected]"
OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
)
```

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

```cmake
CPMAddPackage(
NAME benchmark
GITHUB_REPOSITORY google/benchmark
VERSION 1.5.2
CPMAddPackage("gh:google/[email protected]"
OPTIONS "BENCHMARK_ENABLE_TESTING Off"
)
Expand All @@ -457,11 +448,8 @@ endif()
### [Lua](https://www.lua.org)

```cmake
CPMAddPackage(
NAME lua
GIT_REPOSITORY https://github.com/lua/lua.git
VERSION 5.3.5
DOWNLOAD_ONLY YES
CPMAddPackage("gh:lua/[email protected]"
DOWNLOAD_ONLY YES
)
if (lua_ADDED)
Expand Down

0 comments on commit 1dfebcd

Please sign in to comment.