donate-cpu.py: Enhance library configuration detection#1625
Merged
amai2012 merged 1 commit intoJan 25, 2019
Conversation
Optimize checking of different includes for the same library by using a `list` instead of calling `hasInclude()` several times. Add includes for gtk and qt library detection that were found missing when looking at several daca@home packages.
amai2012
reviewed
Jan 25, 2019
| if hasInclude('temp', ['<wx/', '"wx/']): | ||
| libraries += ' --library=wxwidgets' | ||
| if hasInclude('temp', '<QString>'): | ||
| if hasInclude('temp', ['<QString>', '<QtWidgets>', '<QtGui/']): |
Collaborator
There was a problem hiding this comment.
Could one use a regex #Qt[A-Z][a-z]+> instead?
Collaborator
Author
There was a problem hiding this comment.
I thought about regexp usage. But IMHO it brings not much benefit, at least for now.
amai2012
reviewed
Jan 25, 2019
| os.chdir(workPath) | ||
| libraries = ' --library=posix' | ||
| if hasInclude('temp', '<wx/') or hasInclude('temp', '"wx/'): | ||
| if hasInclude('temp', ['<wx/', '"wx/']): |
Collaborator
There was a problem hiding this comment.
Not exactly addressing this PR, but: using <> vs. "" should be supported the same way for all headers.
If we want to "promote" using <> then wxWidgets should be no exception.
Collaborator
There was a problem hiding this comment.
If we want to "promote" using <> then wxWidgets should be no exception.
yes. hmm I added this even though I really don't like it. I did it because this misuse is apparently common practice.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Optimize checking of different includes for the same library by using a
listinstead of calling
hasInclude()several times.Add includes for gtk and qt library detection that were found missing when
looking at several daca@home packages.