From 7b47c6bd83fe7a5512f196a6e50b4dea015c8a4d Mon Sep 17 00:00:00 2001 From: a6guerre Date: Sun, 22 Dec 2024 15:24:42 -0800 Subject: [PATCH 1/2] 11-readme-clean-up * Added instructions to build sigfn in README * Added instructiosnt to run unit tests in README --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b06f1d0..ad82c69 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,22 @@ Bind callback functions to OS signals in C and C++. SigFn should work in any system with the standard C library, which provides the `` header. +## Building Unit Tests +```bash +cd +mkdir build && cd build +cmake .. -DSIGFN_TESTS=ON +make +``` + +## Running Unit Tests +```bash +cd /build/tests +./unit +# e.g. +./unit sigfn_handle +``` + ## Usage SigFn usage is similar to the `os/signal` package from Golang. @@ -113,4 +129,4 @@ int main(int argc, const char **argv) } return 0; } -``` \ No newline at end of file +``` From 22c5ec40955370a15c2c231341800da5f3b21ed7 Mon Sep 17 00:00:00 2001 From: "John R. Patek" Date: Sun, 22 Dec 2024 18:14:05 -0600 Subject: [PATCH 2/2] rebased on master --- README.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ad82c69..eb6a30f 100644 --- a/README.md +++ b/README.md @@ -12,24 +12,16 @@ which provides the `` header. ## Building Unit Tests ```bash -cd -mkdir build && cd build -cmake .. -DSIGFN_TESTS=ON -make +cmake -S . -B build -DSIGFN_TESTS=ON +cmake --build build ``` ## Running Unit Tests ```bash -cd /build/tests -./unit -# e.g. -./unit sigfn_handle +cd build +ctest -C Debug ``` -## Usage - -SigFn usage is similar to the `os/signal` package from Golang. - ### C Basic SigFn usage in C. It is copied from `pause.c` in the