-
Notifications
You must be signed in to change notification settings - Fork 10
Add boost dependency to CMakeLists #21
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
Open
malter
wants to merge
3
commits into
rock-core:master
Choose a base branch
from
malter:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| rock_find_cmake(Boost) | ||
|
|
||
| rock_library(numeric | ||
| HEADERS | ||
| Combinatorics.hpp | ||
|
|
||
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.
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.
Actually, this should be a dependency of the
rock_librarydirectly, making sure it ends up in the pkg-config file (since Combinatorics.hpp is including a boost header)Uh oh!
There was an error while loading. Please reload this page.
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 didn't found a way to add it directly to the
rock_libraryso far. For me, onlyrock_find_cmake(Boost)is working correctly. If I addDEPS_CMAKE boostit is found in configure phase but doesn't set the boost include directory correctly, either it is added to thenumeric.pcfile.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.
Ok, with a capital "b" it is working in the rock_library as cmake dependency. ;-)
I changed that, but it still doesn't end up in the pkg-config file. Since pkg-config cannot deal with non-pkg-config packages as dependencies it might make sense. How do you deal with such configurations?
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.
Not sure what is going on here ... I'll check it out.
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.
DEPS_CMAKE are not added by default to pkg-config and this is actually good, as CMake for Boost now exports targets, which cannot be used with pkg-config at all.
I think we can merge.
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.
Strongly disagree. While pkg-config does not have the concept of targets, targets are in the end just a glorified module system, which resolves to cflags and libs just like the rest.
I believe the main issue was that the .pc.in template was grossly outdated. I've pushed an updated version on top of these changes in the
add_boost_dependencybranch. @malter could you give it a try ? I don't have a boost installation in a custom location to test.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.
Works for me. Boost is still not listed as dependency but the include path is added to the Cflags. So it should also be fine for libs using base_numeric via pkg_config.
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.
Great. The pkg-config file cannot list Boost as a dependency as Boost does not provide a pkg-config file. Having the include / libs paths in was the goal.
Can you cherry-pick my commit in here ? Then I can let CI pass and merge.