Per-language compiler flags#326
Merged
abouteiller merged 1 commit intoICLDisco:masterfrom Mar 3, 2022
Merged
Conversation
bosilca
approved these changes
Mar 2, 2022
abouteiller
approved these changes
Mar 2, 2022
Contributor
|
Same changes need to be carried to DPLASMA |
Contributor
|
@therault you need to sign your commits |
2 tasks
language they have been tested with. Try all languages for each flag, when it makes sense. Provide a new function to do so in a convenient way. Signed-off-by: Thomas Herault <herault@icl.utk.edu>
b9b777a to
a27be65
Compare
therault
added a commit
to therault/parsec
that referenced
this pull request
Mar 8, 2022
There is a CMake language error in PR ICLDisco#326. If the variable X is already defined (to TRUE or to FALSE or to anything) when calling cmake_language(CALL "check_${Y}_compiler_flag" "-Wall" "X" ) for any Y, then the test is skipped, and the variable remains unchanged. As a result, the function check_and_set_compiler_option would take the flags of the C compiler and apply them to all compilers, which was exactly what we wanted to avoid... This PR fixes that by using a variable name different for each test (adding the language as part of the language name), and uses the code of PR ICLDisco#336 to sanitize the names of the variables/tests. It also cleans up the messages, becoming slightly less verbose than before: it lists the languages that support the flag (or says none) instead of showing two lines per test. This PR should supersede PR ICLDisco#336 if it is approved.
This was referenced Mar 8, 2022
Closed
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.
Use generator expressions to only apply compiler flags for the
language they have been tested with. Try all languages for each
flag, when it makes sense. Provide a new function to do so
in a convenient way.
Closes issue #295