Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 893168

Summary: dev-cpp/catch ebuild enables CATCH_DEVELOPMENT_BUILD which seems meant for catch2 developers External
Product: Gentoo Linux Reporter: Michael <mdever44>
Component: Current packagesAssignee: David Seifert <soap>
Status: RESOLVED DUPLICATE    
Severity: normal CC: lacc97-gentoo.4eq22
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch

Description Michael 2023-02-04 01:03:10 UTC
When installing catch2, CATCH_DEVELOPMENT_BUILD is turned on in the ebuild, which causes projects using catch2 to inherit compiler flags from it. This flag is meant for developers of catch2, and can cause problems when users of catch2 treat warnings as errors.
https://github.com/catchorg/Catch2/blob/devel/docs/cmake-integration.md#cmake-project-options

Reproducible: Always

Steps to Reproduce:
1. Install catch2 v3
2. Use catch2 from in a project that treats warnings as errors but does something to trigger -Werror=float-equal or -Werror=float-equal
3. Compile
Actual Results:  
Failure to compile your project

Expected Results:  
Successful compilation

The current workaround I have is to not use the catch2 in portage
Comment 1 Mike Gilbert gentoo-dev 2023-02-04 19:52:14 UTC
There is no package called dev-cpp/catch2 in gentoo. Do you mean dev-cpp/catch?
Comment 2 Michael 2023-02-04 21:54:00 UTC
Yes, sorry, I meant dev-cpp/catch
Comment 3 Luis Cáceres 2023-03-18 20:34:54 UTC
Created attachment 858253 [details, diff]
patch

Michael, This hacky cmake patch works for me at the moment until the ebuild is updated.
Comment 4 David Seifert gentoo-dev 2023-07-16 09:13:35 UTC

*** This bug has been marked as a duplicate of bug 865207 ***