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

Use CMake find_package for samples when fmt is external to Cantera #1744

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

bryanwweber
Copy link
Member

@bryanwweber bryanwweber commented Jul 29, 2024

Changes proposed in this pull request

  • Bump CMake minimum version for samples to 3.5 to resolve a deprecation warning from CMake
  • Find fmt with find_package() if Cantera is built with fmt as an external library

If applicable, fill in the issue number this pull request is fixing

Closes #1742

If applicable, provide an example illustrating new features this pull request is introducing

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

CMake versions are currently issuing deprecation warnings for versions less than 3.5. There don't seem to be any downsides to bumping this minimum version.
If fmt is set up as an external library when Cantera is built, as is the case on conda-forge, use the CMake find_package function to add the fmt requirement to the linker. This automatically adds the appropriate compiler flags from the fmt CMake configuration.
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.04%. Comparing base (9210b08) to head (bcee6c7).
Report is 33 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1744   +/-   ##
=======================================
  Coverage   73.03%   73.04%           
=======================================
  Files         381      381           
  Lines       54132    54164   +32     
  Branches     9233     9240    +7     
=======================================
+ Hits        39534    39562   +28     
+ Misses      11635    11633    -2     
- Partials     2963     2969    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bryanwweber bryanwweber requested a review from speth July 30, 2024 14:02
@bryanwweber bryanwweber requested review from a team and removed request for speth July 30, 2024 19:48
Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

Thanks - lgtm!

@speth speth merged commit 5893f3f into Cantera:main Jul 30, 2024
50 checks passed
@bryanwweber bryanwweber deleted the 1742-cmake-add-utf-flag-windows branch August 2, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake examples require the /uft-8 flag on Windows if fmt is compiled with Unicode support
3 participants