Added build and test instructions

This commit is contained in:
Pranav 2022-09-21 13:10:14 -05:00 committed by GitHub
parent 176b7e7961
commit 5a83edd3c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,7 @@
* [Restricting the set of values for an argument](#restricting-the-set-of-values-for-an-argument)
* [Using `option=value` syntax](#using-optionvalue-syntax)
* [CMake Integration](#cmake-integration)
* [Building, Installing, and Testing](#building-installing-and-testing)
* [Supported Toolchains](#supported-toolchains)
* [Contributing](#contributing)
* [License](#license)
@ -1084,6 +1085,27 @@ FetchContent_MakeAvailable(argparse)
add_executable(myproject main.cpp)
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
| Compiler | Standard Library | Test Environment |