Skip to content

Add support for catch2#332

Merged
ednolan merged 1 commit intomainfrom
enolan_catch2_1
Apr 1, 2026
Merged

Add support for catch2#332
ednolan merged 1 commit intomainfrom
enolan_catch2_1

Conversation

@ednolan
Copy link
Copy Markdown
Member

@ednolan ednolan commented Apr 1, 2026

This commit allows cookiecutter to support creating Beman libraries that use catch2 as their unit testing library instead of gtest.

It adds a new unit_test_library option to the exemplar cookiecutter parameters that can be set to either "gtest" or "catch2".

It adds a new exemplar-only CI workflow, catch2_exemplar_test.yml, that smoke tests that the catch2 version of the library works properly.

It also bumps infra to include a workaround in use-fetch-content.cmake that allows catch2 to be usable from FetchContent_MakeAvailable without needing to include the workaround in the library's CMake itself.

Fixes #311

This commit allows cookiecutter to support creating Beman libraries
that use catch2 as their unit testing library instead of gtest.

It adds a new unit_test_library option to the exemplar cookiecutter
parameters that can be set to either "gtest" or "catch2".

It adds a new exemplar-only CI workflow, catch2_exemplar_test.yml,
that smoke tests that the catch2 version of the library works
properly.

It also bumps infra to include a workaround in use-fetch-content.cmake
that allows catch2 to be usable from FetchContent_MakeAvailable
without needing to include the workaround in the library's CMake
itself.

Fixes #311
@ednolan ednolan merged commit 13d4f3d into main Apr 1, 2026
97 checks passed
@ednolan ednolan deleted the enolan_catch2_1 branch April 1, 2026 17:05
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same
when pulling f58156c on enolan_catch2_1
into 77ea1ca on main.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cookiecutter should allow choosing between GTest and Catch2

2 participants