-
Notifications
You must be signed in to change notification settings - Fork 56
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
CMake improvements for local build (with static library) #56
Comments
First, thank you for taking the time to file the issue and even a PR. I'll reply both here and on the PR page.
PS:
Just a phrasing nitpick: I don't think you can use "likewise" like you have in your first paragraph. I think you meant "additionally" or "also"; the second sentence does not discuss something that is like the subject of the first sentence. |
What do you mean by not encouraging it in the README.md? Not to document the approach with To support that, not really much should be made:
Those changes are included in the PR. @eyalroz Let's discuss that and later on I can create a PR, or you can add the changes on your own. Whatever you prefer. P.S. Thanks for that nitpick. I stupidly used the hint from spelling add-on. |
@eyalroz what is your opinion on that? :) |
@KKoovalsky : Oh, sorry, I misread "and later on I" for "later on when I". |
tl;dr: Create your PR and I'll basically accept it.
I mean, I am hesitant to list that as one of the ways to use the library. There are other ways as well, e.g. using ExternalProject, which I don't list. If I list it, then I'm obligated to support my
Installing the libraries does not necessarily mean installing them on the target machine. They can be built for the target machine on a build machine and installed on the build machine, for use withe rest of your code.
Well, on that end of the spectrum - you could just take the two source files:
That's what I'm worried/annoyed about. See also the issue I opened about it. Unfortunately, I guess I just have to live with it. And Kitware is not helping project maintainers authors to cope with the conflicting use cases. Even the most trivial assistance, like a page with basic tips, or a small feature such as allowing for scoping or prefixing the subdirectory's options with its name or project name - is not offered to us.
We'll see what you put in your PR. Are you worried about conflicts with another
It's a CMake option and a value defined in |
@eyalroz I understand your point. Having to support multiple ways of incorporating the library into a project might be inconvenient. I think we should find a sweet point between maintainability and usability. The usability is created by the users. When you go to a shop, you expect from the owner to fulfil your demand. If he doesn't, you simply won't come again. Of course, if you demand something impossible, like buying an elephant for $10, no owner will provide that. This is the sweet point I'm talking about. Supporting multiple ways of incorporating the library in a project won't be hard. Thanks to it, more users could benefit from this particular library. The other question is: do we care to have more users? I think we do, because this is FOSS: the fewer users we have, the less sense there is to maintain the library. Regarding installation and cross-compiling, I meant that I never install the libraries and use
I will create a PR with fixing the path to installed |
…tories - during build. This allows other projects to build with librintf's sources, using the `add_subdirectory` command - and thus also with the CMake `FetchContent` module; in such cases, the user-project's code can `#include <printf/printf.h>`, and that will work.
Hello! Thank you, @eyalroz, for continuing the project.
I prefer the fork, since it supports CMake. Likewise, I use it with
FetchContent
:I would like to address some miscellaneous issues which I had to bypass:
function
here to set the local variables to not mutate the parent scope. "Normal variables" are used instead of options. There might be a risk that the name ofBUILD_STATIC_LIBRARY
may clash with other libraries/dependencies - it's quite general. I would prefer to make the name more specific by adding aPRINTF_
prefix to the options, so the variables could be preset by the user also with theoption
command.BUILD_INTERFACE
include directory, because using#include "printf.h"
causes a compile error, since no include directories are propagated by the library.PRINTF_INTEGER_BUFFER_SIZE
CMake option. In the code, it isPRINT_INTEGER_BUFFER_SIZE
. It means that the change to the former doesn't affect the latter.I will create a PR that addresses the issue.
The text was updated successfully, but these errors were encountered: