Mathew Benson 4e1b170b44
Add Separate CMake Target for C++20 Modules (#4685)
* Add Separate CMake Target for C++20 Modules

In the same vein as there is the `fmt::fmt-header-only`, `fmt::fmt` and
`fmt::fmt_c` targets, I propose the addition of a new target
`fmt::fmt-module` which will be for the compilation of the FMT_MODULE
library option.

The new target will have the properties requried for Compiling,
Installing and using the C++20 functionality in CMake

The `add_module_library` function is marked as deprecated as its
functionality is superseded.

Updated the logic for setting the FMT_USE_CMAKE_MODULE flag to check the
versions for Ninja and MSVC according the CMAKE Documents and setting
the FMT_MODULE flag based on this

* Add Separate CMake Target for C++20 Modules

In the same vein as there is the `fmt::fmt-header-only`, `fmt::fmt` and
`fmt::fmt_c` targets, I propose the addition of a new target
`fmt::fmt-module` which will be for the compilation of the FMT_MODULE
library option.

The new target will have the properties requried for Compiling,
Installing and using the C++20 functionality in CMake

Updated the logic for setting the FMT_USE_CMAKE_MODULE flag to check the
versions for Ninja and MSVC according the CMAKE Documents and setting
the FMT_MODULE flag based on this

Fixed the test/CMakeLists.txt file which used the FMT_MODULE flag to
separate the module and non-module library testing, in particular
disableing the module version.

The module testing still needs to be fixed, but the expected behavior of
testing the non-modular version is working.

---------

Co-authored-by: Mathew Benson <mathew@benson.co.ke>
Co-authored-by: ClausKlein <claus.klein@arcormail.de>
2026-03-02 09:11:31 -08:00
..
api.md Add Separate CMake Target for C++20 Modules (#4685) 2026-03-02 09:11:31 -08:00
ChangeLog-old.md Remove a reference to a compromised account 2025-05-30 18:24:56 -07:00
fmt.css Fix doc CSS to display white-space properly (#4622) 2025-12-03 11:35:04 -08:00
fmt.js Improve apidoc formatting 2024-06-01 09:37:32 -07:00
get-started.md Add Separate CMake Target for C++20 Modules (#4685) 2026-03-02 09:11:31 -08:00
index.md chore: minor improvement for docs (#4616) 2025-11-28 12:55:25 -08:00
LICENSE-exception Split exception into a separate file not to confuse openssf 2025-12-17 10:31:12 -08:00
perf.svg Improve docs 2024-06-04 15:26:38 -07:00
python-license.txt Move license to a separate file 2015-05-07 06:43:13 -07:00
syntax.md docs: format two unescaped printf references with backticks (#4578) 2025-10-16 11:27:51 -07:00