Skip to content

What is the proper way to use fmt as a C++ 20 module? #4237

@yuannan

Description

@yuannan

I've seen loads of different examples online, but nothing seems to be in the official documents.

Some people have suggested to wrap fmt in a module and include that, while others have directly included it as a subdirectory in CMake.

I'm a little bit lost as what is the officially supported way to do this.

I'm building a new logging library specifically targeting cpp 23+ using fmt and I would really appreciate some input.

https://gitlab.com/Simple-Cpp/SplLog

Currently it compiles just fine on NixOS, but that is using the older 10.2.0 version that Nix ships. If I try to include as a git submodule and a cmake subdirectory it seems to explode while looking for __fwd/string.

Trying to use 10.2.0 from git but matching to the version Nix ships brings it's own compile issues.

If you can guide me on how to do this, I'd be happy to update the docs to make it a bit easier for new users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions