Skip to content

Commit

Permalink
Update README for changed commands to build unit tests on mac and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Dakshit Babbar committed Jan 30, 2025
1 parent 7b959c6 commit c747e5f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,27 @@ or the following:
submodule is cloned as described [above](#checkout-cmock-submodule))

1. Run the _cmake_ command:

For Linux machines:
```
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_CLONE_SUBMODULES=ON \
-DUNITTEST=1 \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Wsign-compare -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG'
```
Note: For Mac users, additionally add the `-DCMAKE_C_STANDARD=99` flag to the
above command.
For Mac machines:
```
cmake -S test -B build/ \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_CLONE_SUBMODULES=ON \
-DUNITTEST=1 \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Wsign-compare -Werror -DNDEBUG -DLIBRARY_LOG_LEVEL=LOG_DEBUG' \
-DCMAKE_C_STANDARD=99
```
1. Run this command to build the library and unit tests: `make -C build all`.
Expand Down

0 comments on commit c747e5f

Please sign in to comment.