mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Merge pull request #183 from eidelen/eidelen-cmake-fetchcontent
Extend Readme with CMake FetchContent integration of argparse.
This commit is contained in:
commit
f0e20fafdc
20
README.md
20
README.md
@ -775,6 +775,26 @@ $ ./main fex
|
|||||||
baz
|
baz
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## CMake Integration
|
||||||
|
|
||||||
|
Use the latest argparse in your CMake project without copying any content.
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
cmake_minimum_required(VERSION 3.11)
|
||||||
|
|
||||||
|
PROJECT(myproject)
|
||||||
|
|
||||||
|
# fetch latest argparse
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
argparse
|
||||||
|
GIT_REPOSITORY https://github.com/p-ranav/argparse.git
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(argparse)
|
||||||
|
|
||||||
|
add_executable(myproject main.cpp)
|
||||||
|
target_link_libraries(myproject argparse)
|
||||||
|
```
|
||||||
## Supported Toolchains
|
## Supported Toolchains
|
||||||
|
|
||||||
| Compiler | Standard Library | Test Environment |
|
| Compiler | Standard Library | Test Environment |
|
||||||
|
Loading…
Reference in New Issue
Block a user