@@ -4,15 +4,16 @@ An open-source C++ library developed and used at YScope.
44
55# Usage
66
7- ## Via CMake's find_package
7+ ## Via CMake's ` find_package `
88
9- [ Install ] ( #installing-header ) ` ystdlib ` into a directory . Then, in your project's ` CMakeLists.txt ` ,
9+ First, [ install ] ( #installing-header ) ` ystdlib ` onto your system . Then, in your project's ` CMakeLists.txt ` ,
1010add the following:
1111
1212``` cmake
13- # Set `ystdlib_BUILD_TESTING` to an accepted `FALSE` class value to skip building unit tests.
13+ # If `BUILD_TESTING` is set, set `ystdlib_BUILD_TESTING` to an accepted `FALSE` class value to skip
14+ # building ystdlib's unit tests.
1415# option(ystdlib_BUILD_TESTING "" OFF)
15- # If ystdlib is not installed to a path that is searched by default, use `ystdlib_ROOT` to manually
16+ # If ystdlib is not installed to a path that is searched by default, set `ystdlib_ROOT` to manually
1617# specify the location.
1718# set(ystdlib_ROOT "<PATH_TO_INSTALLATION>")
1819find_package(ystdlib REQUIRED)
@@ -39,44 +40,57 @@ git submodule update --init --recursive
3940
4041If you want to open the project in an IDE, run the following command to install any necessary
4142dependencies from source:
43+
4244``` shell
43- task deps:install- all
45+ task deps:all
4446```
4547
4648## Building
47- To build all targets:
48- ``` shell
49- task build:all
50- ```
5149
52- To build an executable containing all unit tests:
50+ To build all libraries (targets) run:
51+
5352``` shell
54- task build:unit-test- all
53+ task build:build- all-release
5554```
5655
57- To build an executable containing a single library's unit tests:
56+ To build a single library (target) use the format:
57+
5858``` shell
59- task build:unit-test-< lib_name>
59+ task build:build-< target> -< build type>
60+ e.g.:
61+ task build:build-error_handling-release
6062```
6163
6264## Installing {#installing-header}
6365
64- To install ystdlib after building:
66+ To build and install ystdlib run:
67+
68+ ``` shell
69+ task build:install-all-release INSTALL_PREFIX=" /install/prefix/path"
70+ ```
71+
72+ To build and install a single library (target) use the format:
6573
6674``` shell
67- cd build
68- cmake --install . --prefix=/path/to/install/to
75+ task build:install-< target> -< build type> INSTALL_PREFIX=" <prefix path>"
76+ e.g.:
77+ task build:install-error_handling-release
6978```
7079
7180## Testing
72- To build and run all unit tests:
81+
82+ To build and run all unit tests use:
83+
7384``` shell
74- task test-all
85+ task test:test -all-debug
7586```
7687
77- To build and run unit tests for a specific library:
88+ To build and run the unit tests for a single library (target) use the format:
89+
7890``` shell
79- task test-< lib_name>
91+ task test:test-< target> -< build type>
92+ e.g.:
93+ task test:test-error_handling-release
8094```
8195
8296When generating a testing target, the CMake variable ` BUILD_TESTING ` is followed (unless overruled
0 commit comments