mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-17 12:54:40 +00:00
Added build and test instructions
This commit is contained in:
parent
176b7e7961
commit
5a83edd3c4
22
README.md
22
README.md
@ -46,6 +46,7 @@
|
|||||||
* [Restricting the set of values for an argument](#restricting-the-set-of-values-for-an-argument)
|
* [Restricting the set of values for an argument](#restricting-the-set-of-values-for-an-argument)
|
||||||
* [Using `option=value` syntax](#using-optionvalue-syntax)
|
* [Using `option=value` syntax](#using-optionvalue-syntax)
|
||||||
* [CMake Integration](#cmake-integration)
|
* [CMake Integration](#cmake-integration)
|
||||||
|
* [Building, Installing, and Testing](#building-installing-and-testing)
|
||||||
* [Supported Toolchains](#supported-toolchains)
|
* [Supported Toolchains](#supported-toolchains)
|
||||||
* [Contributing](#contributing)
|
* [Contributing](#contributing)
|
||||||
* [License](#license)
|
* [License](#license)
|
||||||
@ -1084,6 +1085,27 @@ FetchContent_MakeAvailable(argparse)
|
|||||||
add_executable(myproject main.cpp)
|
add_executable(myproject main.cpp)
|
||||||
target_link_libraries(myproject argparse)
|
target_link_libraries(myproject argparse)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Building, Installing, and Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repository
|
||||||
|
git clone https://github.com/p-ranav/argparse
|
||||||
|
cd argparse
|
||||||
|
|
||||||
|
# Build the tests
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DARGPARSE_BUILD_TESTS=on ..
|
||||||
|
make
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
./test/tests
|
||||||
|
|
||||||
|
# Install the library
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
## Supported Toolchains
|
## Supported Toolchains
|
||||||
|
|
||||||
| Compiler | Standard Library | Test Environment |
|
| Compiler | Standard Library | Test Environment |
|
||||||
|
Loading…
Reference in New Issue
Block a user