-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consider a header only release #455
Comments
Optional header-only configuration enabled with the FMT_HEADER_ONLY macro. Last item in the features list in the README |
Nice! So I need to download and build the header only configuration? Or do I save all the code and then define the macro in my build system? |
I've never used cmake to build the header, but a quick scan through looks like it does generate one header if the cmake version is greater than or equal to 3.1.0. I've personally just included all the *.h and *.c files in my source and just globally defined FMT_HEADER_ONLY. |
Thanks, I'll give building into single header a try. |
Well, cmake won't build a single header file, it looks like catch.hpp wrote some custom .py scripts to glob them all together into a single header. Would that be something this project would be interested in? I may contribute a pull request if so. |
I decided to just do this instead. Download the library, then write my own // https://github.com/fmtlib/fmt
#ifndef _FMT_HPP_
#define _FMT_HPP_
#ifndef FMT_HEADER_ONLY
#define FMT_HEADER_ONLY
#endif
#include <fmt/format.h>
#endif // _FMT_HPP_
` |
I would love to use this library! I recently started using catch.hpp, a header-only unit test framework.
How hard would it be to create a single header release of fmt?
The text was updated successfully, but these errors were encountered: