Use Ninja in build example
This commit is contained in:
parent
9b1a7b3bf4
commit
9bd7dbc41c
28
README.md
28
README.md
|
@ -78,18 +78,26 @@ The following counts for `c++utilities` and my other libraries unless stated oth
|
||||||
* For dependencies of my other projects check the README.md of these projects.
|
* For dependencies of my other projects check the README.md of these projects.
|
||||||
|
|
||||||
### How to build
|
### How to build
|
||||||
Example using `make`:
|
Example:
|
||||||
```
|
```
|
||||||
cd "path/to/build/directory"
|
cmake -G Ninja \
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
-S "path/to/source/directory" \
|
||||||
-DCMAKE_INSTALL_PREFIX="/final/install/location" \
|
-B "path/to/build/directory" \
|
||||||
"path/to/projectdirectory"
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
make tidy # format source files (optional, must be enabled via CLANG_FORMAT_ENABLED)
|
-DCMAKE_INSTALL_PREFIX="/final/install/location"
|
||||||
make # build the binaries
|
make # build the binaries
|
||||||
make check # build and run tests (optional)
|
cmake --build "path/to/build/directory"
|
||||||
make coverage # build and run tests measuring test coverage (optional, must be enabled via CLANG_SOURCE_BASED_COVERAGE_ENABLED)
|
# format source files (optional, must be enabled via CLANG_FORMAT_ENABLED)
|
||||||
make apidoc # build API documentation (optional)
|
cmake --build "path/to/build/directory" --target tidy
|
||||||
make DESTDIR="/temporary/install/location" install # install binaries, headers and additional files
|
# build and run tests (optional)
|
||||||
|
cmake --build "path/to/build/directory" --target check
|
||||||
|
# build and run tests measuring test coverage (optional, must be enabled via CLANG_SOURCE_BASED_COVERAGE_ENABLED)
|
||||||
|
cmake --build "path/to/build/directory" --target coverage
|
||||||
|
# build API documentation (optional)
|
||||||
|
cmake --build "path/to/build/directory" --target apidoc
|
||||||
|
# install binaries, headers and additional files
|
||||||
|
DESTDIR="/temporary/install/location" \
|
||||||
|
cmake --install "path/to/build/directory"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### General notes
|
#### General notes
|
||||||
|
|
Loading…
Reference in New Issue