Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add meson option to not install the library #2940

Merged
merged 3 commits into from
Jan 5, 2025
Merged

Conversation

burlog
Copy link
Contributor

@burlog burlog commented Nov 30, 2024

Description

This pull request introduces a Meson build option to allow users to disable the installation of the Catch2 library when using it as a subproject wrap.

The added install Meson option lets users include Catch2 as a subproject with default_options: ['install=false'], effectively preventing it from being installed alongside the main project or library. For example:

catch2_with_main = subproject('catch2-with-main', default_options: ['install=false'])

Catch2's primary purpose is for testing, and when included as a wrap, its installation is often unnecessary. In scenarios where Catch2 is used as a testing dependency, users typically don't want it to be installed with their project.

Currently, the Meson build system doesn't natively support disabling the installation of wraps. While Meson offers a --skip-subprojects flag during installation, it must be manually specified every time meson install is run, which can be cumbersome and error-prone.

This change streamlines the process, improving user experience by eliminating the need for repetitive manual configuration. It aligns with the expected use cases for Catch2 when employed as a testing utility.

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.99%. Comparing base (0321d2f) to head (4cd7c0e).
Report is 4 commits behind head on devel.

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #2940   +/-   ##
=======================================
  Coverage   90.99%   90.99%           
=======================================
  Files         198      198           
  Lines        8597     8597           
=======================================
  Hits         7822     7822           
  Misses        775      775           

@horenmar horenmar added the Building and Packaging Issues affecting build/packaging scripts and utilities label Jan 5, 2025
@horenmar
Copy link
Member

horenmar commented Jan 5, 2025

Makes sense, thanks.

@horenmar horenmar merged commit 6e9c34a into catchorg:devel Jan 5, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Building and Packaging Issues affecting build/packaging scripts and utilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants