Notes |
|
(0037089)
|
Brad King
|
2014-10-28 14:12
|
|
I cannot reproduce this. Our test suite covers add_compile_options and passes on Xcode.
Please provide an example CMakeLists.txt that shows the failure. |
|
|
(0037090)
|
Ilya
|
2014-10-28 16:24
|
|
I uploaded both CMakeLists.txt and generated Xcode project. |
|
|
(0037094)
|
Nils Gladitz
|
2014-10-28 18:19
|
|
add_compile_options() populates the COMPILE_OPTIONS directory property.
When a target is created (e.g. add_executable()) these options are copied into the COMPILE_OPTIONS target property.
The attached test project sets the options after the target has been created which is why they don't take effect. |
|
|
(0037098)
|
Brad King
|
2014-10-29 09:23
|
|
|
|
(0037101)
|
Ilya
|
2014-10-29 13:18
|
|
But it seems to work for add_definitions. I though add_compile_options is just a specific version of add_definitions. Why does it work in one case but not in the other? |
|
|
(0037103)
|
Brad King
|
2014-10-29 14:49
|
|
Re 0015225:0037101: add_definitions was one of the earliest commands so its behavior has been kept for compatibility. The add_compile_options command is quite new and uses what we've learned from experience over the years. It is better for a target to use directory-level settings to initialize its main build properties upon creation but then not pay attention to them anymore. That way a target can be modified independent of further directory-level settings with the target_* commands or direct target property settings. |
|
|
(0037104)
|
Ilya
|
2014-10-29 15:16
|
|
If you're going to maintain this compatibility it would make sense to specify it command description. |
|
|
(0037105)
|
Brad King
|
2014-10-29 15:25
|
|
|
|
(0038435)
|
Robert Maynard
|
2015-04-06 09:07
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|