Skip to content

Commit 7eac674

Browse files
authored
Allow using ctest for testing (#29)
1 parent 0fb4641 commit 7eac674

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $ cmake --build build --parallel
2222
## Test
2323

2424
```bash
25-
$ build/bin/run_tests
25+
$ ctest --test-dir build
2626
```
2727

2828
## Code coverage

test/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ add_executable(run_tests ${TEST_SRC_FILES})
44
target_link_libraries(run_tests PUBLIC
55
gtest_main
66
)
7+
8+
if(NOT WIN32)
9+
include(GoogleTest)
10+
gtest_discover_tests(run_tests)
11+
12+
enable_testing()
13+
endif()

0 commit comments

Comments
 (0)