Skip to content

catch2: add v3.10.0 through v3.16.0 - #6821

Open
knoepfel wants to merge 3 commits into
spack:developfrom
knoepfel:update-catch2
Open

knoepfel wants to merge 3 commits into
spack:developfrom
knoepfel:update-catch2

Conversation

@knoepfel

@knoepfel knoepfel commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Long overdue recipe updates. This PR also adds the threadsafe variant which enables thread-safe assertions.

@knoepfel
knoepfel requested a review from greenc-FNAL October 1, 2026 19:57
@spackbot-triage spackbot-triage Bot added new-version Modifications to packages' `depends_on()` directives update-package Modifications to packages in the repository labels Oct 1, 2026
@spackbot-triage
spackbot-triage Bot requested a review from ax3l October 1, 2026 19:58
@spackbot-triage spackbot-triage Bot added the new-variant Modifications to packages' `variant()` directives label Oct 1, 2026
@knoepfel

knoepfel commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

@greenc-FNAL or @ax3l, are either of you able to review this?

greenc-FNAL
greenc-FNAL previously approved these changes Nov 3, 2026

@ax3l ax3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, ty!

@ax3l
ax3l requested a balanced review from Copilot November 3, 2026 22:49
@ax3l
ax3l enabled auto-merge (squash) November 3, 2026 22:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The +threadsafe variant passes an unused CMake option for Catch2 3.10.0 and 3.11.0, leaving thread-safe assertions disabled unless the option name is selected by version.

1 open issue
What changed in this PR

Updates Spack’s Catch2 recipe with newer releases and an optional thread-safe assertions variant.

Changes:

  • Adds ten release entries and checksums spanning 3.10.0–3.16.0.
  • Adds a default-off threadsafe variant for versions 3.9 onward and connects it to CMake configuration.
File Description
repos/​spack_repo/​builtin/​packages/​catch2/​package.py Adds Catch2 releases and the threadsafe variant with CMake option handling.

Review effort: Balanced

args.append(self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"))
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
if "+threadsafe" in spec:
args.append(self.define("CATCH_CONFIG_THREAD_SAFE_ASSERTIONS", True))

@ax3l ax3l Nov 3, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting o.0 Feel free to make more robust or limit support for this to 3.12+ after it settled for one option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-variant Modifications to packages' `variant()` directives new-version Modifications to packages' `depends_on()` directives update-package Modifications to packages in the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants