-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
contributing.md: Add build instructions #1484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
< 8000 p dir="auto">Whoops, I just noticed that my editor auto-removed existing trailing whitespace as well. I can undo this or move it into a new PR if you like. |
Codecov Report
@@ Coverage Diff @@
## master #1484 +/- ##
==========================================
- Coverage 80.42% 80.39% -0.03%
==========================================
Files 121 121
Lines 3421 3426 +5
==========================================
+ Hits 2751 2754 +3
- Misses 670 672 +2 |
Codecov Report
@@ Coverage Diff @@
## master #1484 +/- ##
=========================================
Coverage ? 80.39%
=========================================
Files ? 121
Lines ? 3426
Branches ? 0
=========================================
Hits ? 2754
Misses ? 672
Partials ? 0 |
Thanks and don't worry about the whitespace changes. |
docs/contributing.md
Outdated
* Compiling Catch's SelfTest project: | ||
``` | ||
$ cd Catch2 | ||
$ cmake -Bcmake-build-debug -H. -DCATCH_BUILD_TESTING=ON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a small nitpick for this:
This doesn't actually configure the build to be done in the Debug configuration, even though the build folder is named that way. To have the build be configured for Debug, you need to add -DCMAKE_BUILD_TYPE=Debug
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you don't need -DCATCH_BUILD_TESTING=ON
, as it is the default and will remain that way.
docs/contributing.md
Outdated
$ cd Catch2 | ||
$ cmake -Bcmake-build-debug -H. -DCATCH_BUILD_TESTING=ON | ||
$ cd cmake-build-debug/ | ||
$ make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only work for Unixish systems and not on Windows. To support Windows, the last two steps can be changed to cmake --build cmake-build-debug
instead.
Also we support approvals through CTest now, so the building and testing can be done like so
cmake -Bcmake-build-debug -H. -DCMAKE_BUILD_TYPE=Debug
cmake --build cmake-build-debug
cd cmake-build-debug
ctest -C Debug --output-on-failure
The advantage of this approach is that it can be used without change on both Unixish systems and Windows.
The disadvantage is that to get better control, you need to familiarize yourself with another tool (CTest), so it is probably worth it to keep a separate guide for running the approval tests manually.
d08e35d
to
2988e9f
Compare
Description
When looking into the
contributing.md
, I would’ve found it helpful to see at a glance how I can build and run the SelfTest binary correctly. This PR adds instructions for this.Note that the instructions in this PR are what I came up with after some trial & error; if there’s a more elegant way to build the SelfTest binary I’d be more than happy to change the text accordingly :)
GitHub Issues
--