Skip to content

Add catch2 2.13.10 as a source dependency - #53

Open
luapmartin wants to merge 1 commit into
musescore:mainfrom
luapmartin:luapmartin/catch2
Open

luapmartin wants to merge 1 commit into
musescore:mainfrom
luapmartin:luapmartin/catch2

Conversation

@luapmartin

Copy link
Copy Markdown
Contributor

Adds Catch2 2.13.10 (the last Catch2 v2, single header, target Catch2::Catch2) as a source dependency, for the Audacity AU3 libraries' unit tests (audacity/audacity#12356). Audacity 3 used Catch2 2.13.8; its tests include <catch2/catch.hpp> and Catch2Main.cpp defines CATCH_CONFIG_MAIN, so v2 is the drop-in choice; a move to v3 can come with a port of the tests.

catch2_add_to_build() adds the source tree with the self-tests, docs install, helpers install and -Werror off. Catch2 2.x still declares cmake_minimum_required(3.5), so the function sets CMAKE_POLICY_DEFAULT_CMP0077 to NEW for those variables to win over its option() defaults.

Consumer side (Audacity, follow-up PR): require_source_dep(catch2) under MUSE_ENABLE_UNIT_TESTS and catch2_add_to_build() before the AU3 libraries.

Verified by configuring and building Audacity with unit tests on, where 12 Catch2 test executables build and pass.

Assisted by Claude Code (Claude Fable 5.1).

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.

1 participant