This MR introduces a fallback solution for std::format
when building the most recent GeoModel codebase on macOS 13 Ventura or other platforms that support only an incomplete set of C++20 features.
The fallback is mostly transparent to the end user: CMake requests C++20 as the default version, then checks if std::format is supported; if not, it search for a local installation of the fmt
library; if not found, the latest version of the fmt
library is fetched during the build, just for the compilation.
A Note: fmt
is the library that defined the format
feature, whose code was merged into C++20 as std::format
. Therefore, the fmt
library is a de facto 1:1 replacement for std::format
when it is missing on a specific platform.
Tested on macOS 13.7