fileapi: Export actual command-line for targets added via add_custom_target
Hello! At PlatformIO, we're extensively using cmake-file-api
feature to get information about build environment for several complex projects (Zephyr, ESP-IDF). The only thing that sometimes gets in the way is that CMake doesn't export the actual command line for targets specified using add_custom_target
function, so we're forced to reproduce these commands manually. Is there a proper way to retrieve this information?
At the moment, the reply file only contains the location of a target where it was added, e.g.:
...
{
"commands" :
[
"add_custom_target"
],
"files" :
[
"/path/to/project/CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 44,
"parent" : 0
}
]
}
...
Thanks in advance!
Edited by Valerii Koval