Notes |
|
(0040255)
|
Anil Altinay
|
2016-01-19 01:19
(edited on: 2016-01-19 16:29) |
|
target_compile_options(..) get rid of same flags. In my case
target_compile_options(schedRandomizePercentage PRIVATE -mllvm -sched-randomize -mllvm -sched-randomize-percentage=100)
It tries to execute second flag without -mllvm but that is not what I want. I have tried following tricks to go around the problem but none of them worked.
______________TRICKS______________
1. Using PUBLIC instead of PRIVATE
2. Using semicolon instead of space between flags
3. Separating same flags into different commands like the following.
target_compile_options(schedRandomizePercentage PRIVATE -mllvm -sched-randomize)
target_compile_options(schedRandomizePercentage PRIVATE -mllvm -sched-randomize-percentage=100)
|
|
|
(0040260)
|
Brad King
|
2016-01-19 10:28
|
|
Re 0015826:0040255: I think that is the underlying problem and so I've updated the summary accordingly. The latter approach in the description is the intended interface.
|
|
|
(0040261)
|
Brad King
|
2016-01-19 10:33
|
|
|
|
(0040276)
|
Stephen Kelly
|
2016-01-20 15:33
|
|
Yes, I think that was my intention there. It seems to have been that way since it was introduced. I think the de-duplication was just intended to follow the pattern which include directories and compile definitions follow, but that doesn't may not make sense for compile options indeed. |
|
|
(0040277)
|
Brad King
|
2016-01-20 16:05
|
|
Re 0015826:0040276: Thanks. The de-duplication is nice when flags are repeated only because they come from different targets that happen to provide the same flags in their INTERFACE_COMPILE_OPTIONS. However:
- Options specified within a single target's property should not be de-duplicated because repeats may be intentional
- Grouped options must be retained or de-dupliated together
We have at least these cases:
"-option" "-unrelated-option"
"-option" "value-to-option" [maybe-more-values]
"-option with space"
Right now we have no way to tell the first two cases apart. We offer no way to encode the grouping information because we treat options with spaces as single options that happen to have spaces. |
|
|
(0042876)
|
Kitware Robot
|
2016-06-10 14:29
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|