Skip to content

Commit 1e5b9bc

Browse files
committed
Add readme pass.
1 parent 8183762 commit 1e5b9bc

File tree

2 files changed

+41
-24
lines changed

2 files changed

+41
-24
lines changed

README.md

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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`,
1010
add 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>")
1819
find_package(ystdlib REQUIRED)
@@ -39,44 +40,57 @@ git submodule update --init --recursive
3940

4041
If you want to open the project in an IDE, run the following command to install any necessary
4142
dependencies 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

8296
When generating a testing target, the CMake variable `BUILD_TESTING` is followed (unless overruled

examples/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Examples
22

3-
The example program `main` uses ystdlib's 4 different library targets.
3+
The example program `linking-tests` references all of ystdlib's library targets to ensure they can
4+
be installed and link correctly.
45

56
## Building
67

7-
To build the examples, run one of the following task commands
8+
To build the examples, run one of the following task commands:
9+
810
```shell
911
# debug build
1012
task build:examples-debug
@@ -15,7 +17,8 @@ task build:examples-release
1517

1618
## Running
1719

18-
Run the example program as follows: it should display "Example is run!" at the end of execution
20+
Run the example program as follows:
21+
1922
```shell
20-
./examples/build/main
23+
./build/examples/debug/linking-tests
2124
```

0 commit comments

Comments
 (0)