Fix: Use unique /Catch2 prefix for reproducible builds #3063
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.
Fixes #3042
Summary
Changes the reproducible build path mapping to use
/Catch2prefix instead of empty string, avoiding conflicts when multiple libraries use reproducible builds.Changes
-ffile-prefix-mapto use/Catch2/prefix inCMake/CatchMiscFunctions.cmakeextras/gdbinitandextras/lldbinitdocs/ci-and-misc.mdProblem Solved
When both Catch2 and user projects enable
CATCH_ENABLE_REPRODUCIBLE_BUILD, debuggers (GDB/LLDB) can only map one empty prefix path at a time, causing conflicts. Using a unique/Catch2/prefix allows both to coexist.Users need to add to their debugger config:
set substitute-path /Catch2 /path/to/Catch2