-
Notifications
You must be signed in to change notification settings - Fork 214
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
fmt: add header-only
option to make it truly header-only
#1811
Conversation
c2a5388
to
366e239
Compare
366e239
to
27b195c
Compare
857af33
to
c4ee85f
Compare
81188e0
to
3de2893
Compare
install: true, | ||
build_by_default: false, | ||
# so we do not build libfmt when using fmt_header_only | ||
install: not meson.is_subproject(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks things for people who use this wrap and do want to build and use fmt as a shared library.
The common solution in these cases is to have a project option to select whether the dep should be built as a lib or is used as a header only lib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
25f1e3e
to
7959593
Compare
enable-header-only
option to make it truly header-only
7959593
to
d03ffd6
Compare
@@ -0,0 +1,6 @@ | |||
option( | |||
'enable-header-only', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We intentionally do not use 'enable-prefix in option names as it is an autoconfism.
header-only` says the same thing more concisely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
d03ffd6
to
c0ecc2d
Compare
a naive question, is this the correct way to use this new option? |
enable-header-only
option to make it truly header-onlyheader-only
option to make it truly header-only
c0ecc2d
to
ca70357
Compare
Yes. |
Thanks, does this mean there is now way force this option and make it not overridable from cli? |
What is specified on the CLI always overrides everything written in build files. This is mandatory so people can configure their deps to their liking without having to edit their subprojects' source code. |
Ah, I know. Unless I have |
close #1803
fmt has a header only mode which allow to be used without need to compile cc files.