Skip to content

Commit 67ff040

Browse files
committed
Add spec discovery to README
1 parent 4be75b1 commit 67ff040

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ FetchContent_Declare(
2929
CPMAddPackage("gh:toroidal-code/cppspec@VERSION")
3030
```
3131

32+
Specs can then be automatically added as targets with
33+
```cmake
34+
discover_specs(specs_folder)
35+
```
36+
This will create a separate executable for every file ending in `_spec.cpp` in the given directory (recursive) and add them to CTest.
37+
3238
## Introduction
3339

3440
If you've ever used RSpec or Jasmine, chances are you'll be familiar with C++Spec's syntax. For example, this is a C++Spec version of the first snippet on RSpec's [README](https://github.com/rspec/rspec-core/blob/master/README.md#basic-structure).

0 commit comments

Comments
 (0)