-
Notifications
You must be signed in to change notification settings - Fork 191
Ensure module output directory is generated in configure stage #521
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
Conversation
- subprojects using the stdlib's build interface will resolve the module output directory before it is created and error without this fix
Is this something I can test, by forking stdlib-cmake-example and trying to build a project with several modules? |
I'm already fixing this behaviour in the CMake example, you would have to remove my fix from there first to check: |
Won't happen with a single dependency, so this can't be tested with the CMake example. I usually hit issues with non-existent include directories when working with five to six interdependent CMake projects and multiple levels of dependencies, looks something like this:
This error is usually gone on the second CMake run since all module directories are generated after the first run, even if it was unsuccessful because one target tried to access the module directory of a dependency before it was created. I'm usually fixing this in my find modules by moving the module directory generation to an earlier point. Did cost me some time to figure this out and it is a quite unintuitive error. I guess users of stdlib have a low chance of ever encountering this issue and if they are able to build the required complexity in CMake they might also be able to figure out the hack to fix this. Still, it would be preferable if we can mitigate this issue directly in stdlib. |
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.
I'm not well versed in CMake, but the change is small and I trust you have tested this so +1.
As a side note: do you think it makes sense to add a link in your comment, e.g. "see PR #521", or is this unnecessary because it can always be queried using git?
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!
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.
Sounds good to me. Thank you.
Uh oh!
There was an error while loading. Please reload this page.