Update Catch2 library settings for MSVC and C++ standard#3066
Open
AbhishekkSaini wants to merge 1 commit intocatchorg:develfrom
Open
Update Catch2 library settings for MSVC and C++ standard#3066AbhishekkSaini wants to merge 1 commit intocatchorg:develfrom
AbhishekkSaini wants to merge 1 commit intocatchorg:develfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #3066 +/- ##
==========================================
- Coverage 91.14% 91.09% -0.06%
==========================================
Files 202 202
Lines 8831 8840 +9
==========================================
+ Hits 8049 8052 +3
- Misses 782 788 +6 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improves Catch2 compilation times by enabling some standard build optimizations that were previously disabled.
The main changes are:
/MPflag to compile files in parallel across CPU coresI tested a few different batch sizes and found that 8 works well - higher values like 25 caused some operator overload ambiguity issues during compilation, but 8 seems to avoid those while still giving good speedup.
On my machine (8 cores, MSVC), build time went from about 70 seconds down to around 10-15 seconds, so it's a pretty substantial improvement. The
/MPflag only affects MSVC builds, so other compilers shouldn't see any difference there, but they should still benefit from the unity build settings.GitHub Issues
Fixes #2894