Skip to content

Commit

Permalink
Update readme: this library is not built (#43)
Browse files Browse the repository at this point in the history
This library is header-only. The readme suggests setting CMake variables when _building_ this library, which is misleading.
  • Loading branch information
marvinwilliams authored Dec 14, 2022
1 parent f3be32f commit 5c7a4be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ KASSERT(a + a == b, "Under the assumption that a is " << a << ", the world is a
```

Use `THROWING_KASSERT` to throw an exception if the assertion fails.
This requires the library to be build in exception mode (`-DKASSERT_EXCEPTION_MODE=On`).
This requires the CMake option `KASSERT_EXCEPTION_MODE` to be set.
If exception mode is not enabled, `THROWING_KASSERT` acts the same as `KASSERT`.

```c++
Expand All @@ -51,11 +51,10 @@ argument, followed by the remaining arguments `[, ...]` passed to `THROWING_KASS

### Assertion Levels

To control which assertions are enabled or disabled, you must supply the CMake option `-DKASSERT_ASSERTION_LEVEL=<numeric>`.
If omitted, the assertion level is set to `0`, which disables all assertions.

Assertions are enabled if their assertion level (optional third parameter of `KASSERT`) is **less than or equal to** the active assertion level.
The default level is `kassert::assert::normal` (30).
Set the CMake variable `KASSERT_ASSERTION_LEVEL` to the numeric value of the desired assertion level.
If omitted, the assertion level is set to `0`, which disables all assertions.

### Custom Assertion Levels

Expand Down

0 comments on commit 5c7a4be

Please sign in to comment.