Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
624 stars 350 forks source link

CMake examples require the `/uft-8` flag on Windows if `fmt` is compiled with Unicode support #1742

Closed bryanwweber closed 4 months ago

bryanwweber commented 4 months ago

Problem description

The PR to update the conda package to fmt-11 was failing builds because the examples on Windows, compiled with CMake, were missing the /utf-8 flag for Unicode support. The fix I landed on for the recipe was to add fmt as an external package with find_package() so that the appropriate flag was added automatically by the fmt CMake config. The patch file is located here. That patch should be ported to upstream Cantera to fix the issue.

We should also bump the CMake minimum version as part of the fix for this issue, to resolve the deprecation warning from CMake:

-- Building for: Visual Studio 17 2022
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.