Hi, fmtlib supports using FMT_MODULE
to make itself a c++ module, but the implementation is building manually rather than using native support from CMake. This leads to some problems. For example, we cannot add definitions like FMT_STATIC_THOUSANDS_SEPARATOR
.
I saw previous discussion #3429 (comment) concerning native support from CMake is not yet ready. But now it has been stabilize: https://www.kitware.com/import-cmake-the-experiment-is-over. Maybe it's time to add the support?
I tried something like
add_library(fmt STATIC) target_sources(fmt PUBLIC FILE_SET CXX_MODULES FILES fmt/src/fmt.cc) target_include_directories(fmt PRIVATE fmt/include) target_compile_definitions(fmt PUBLIC FMT_USE_FLOAT=0 FMT_USE_DOUBLE=0 FMT_USE_LONG_DOUBLE=0 FMT_USE_FLOAT128=0 FMT_USE_LONG_DOUBLE=0)
and it does work! (though we cannot add FMT_STATIC_THOUSANDS_SEPARATOR
unless we comment out chrono.h
.)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4