propagate libcxx flags to CMake consumers #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With clang, I think it would be nice to propagate the usage flags for libcxx. It enables a consuming project to do this:
Since nanogui will put these flags in automatically, it ends up being a usage requirement and currently the consumer needs to manually add back the libcxx flags from nanogui's
CMakeLists.txt
somehow.An alternative would be to just set a variable in the package config file to at least make the flags that were used available to consumers if forcing it on the target seems like a bad idea for some reason.
Will likely create merge conflict with #104 so will rebase one or the other, both together were needed for me to use nanogui externally, I can't compile with gcc 11 on fedora for reasons that don't seem related to this project at all (something about missing attributes in X11 headers...). AKA I've tested this locally, but additional testing would be a good idea (especially on mac).