Notes |
|
(0030781)
|
Alex Neundorf
|
2012-08-27 16:10
|
|
|
|
(0030785)
|
Stephen Kelly
|
2012-08-28 03:08
|
|
The target->GetProperty("INCLUDE_DIRECTORIES"); seems to work currently, but will not work when include_directories can contain generator expressions. The code in question runs at generate-time. Why do you not want to use target->GetIncludeDirectories() as all other generators do?
I tested the target->GetProperty("COMPILE_DEFINITIONS"); change and it seems to work, but I can't figure out how. COMPILE_DEFINITIONS does not 'chain', and I can't find any code that initializes the target property from the Makefile, as is done for INCLUDE_DIRECTORIES. How does that work?
The COMPILE_DEFINITIONS change has the same problem with regard to future generator expressions, but there is not really any better API for that yet as there is for GetIncludeDirectories (though there is cmLocalGenerator::AppendDefines which could be made static and would enforce uniqueness).
Additionally I notice that the COMPILE_DEFINITIONS_${CONFIG} variables are not handled with Automoc, as they are with other generators. It probably makes sense to fix this in the same branch to do more like what, eg, the Ninja generator does in cmNinjaTargetGenerator::ComputeDefines(). |
|
|
(0030789)
|
Alex Neundorf
|
2012-08-28 16:20
|
|
No problem, I can use GetIncludeDirectories(), it's just that when I looked at the (current) code, the only thing it does over the plain GetProperty("INCLUDE_DIRECTORIES") is to remove duplicates and turn it into a vector, which I have to turn back into a string then, so I thought it's easier and has the same effect as directly getting the property.
But if you think it's better, I can use GetIncludeDirectories(). |
|
|
(0030793)
|
Stephen Kelly
|
2012-08-29 05:18
|
|
Ok, cool. Any idea about how the target->GetProperty("COMPILE_DEFINITIONS"); seems to get the COMPILE_DEFINITIONS from the makefile too? Any response to the configuration specific COMPILE_DEFINITIONS? |
|
|
(0030929)
|
Alex Neundorf
|
2012-09-05 16:01
|
|
The include dirs should now be handled correctly in the AutomocUseTargetProperties branch on stage.
I still need to have a look at the compile definitions. |
|
|
(0031064)
|
Alex Neundorf
|
2012-09-19 11:46
|
|
Merged the AutomocUseTargetProperties branch into next. |
|