[cmake-developers] daemon-mode: Project structure
Tobias Hunger
Tobias.Hunger at qt.io
Thu Jun 9 05:47:44 EDT 2016
Hello everybody,
I made some progress with extracting project structure from cmake via the
daemon-mode. I am rather happy with the information and would love to get some
feedback from other interested parties.
Here is the format that is currently reported (with comments;-):
[== CMake MetaMagic ==[
{
# Reply header:
"cookie":"",
"type":"reply"
"inReplyTo":"project",
# Data:
"projects":
[
{
"configurations":
[
{
"name":"",
"targets":
[
{
"fullName":"test",
"name":"test",
"type":"GLOBAL_TARGET"
},
# <snip>
{
"buildDirectory":"/tmp/cmake-build-test/Source/CursesDialog/form",
"fullName":"libcmForm.a",
"linkerLanguage":"C",
"name":"cmForm",
# "sysroot": "/some/path", if set...
"sourceGroups": # Just groups files with similar settings
# together to save space
[
{
"compileFlags":" -std=gnu11",
"defines":
[
"CURL_STATICLIB",
# <snip>
"LIBARCHIVE_STATIC"
],
"includePath":
[
"/tmp/cmake-build-test/Utilities",
# <snip>
"/home/code/src/cmake/Source/CursesDialog/form"
],
"lanugage":"C",
"sources":
[
"fld_arg.c",
# <snip>
"fty_regex.c"
]
}
],
"type":"STATIC_LIBRARY"
},
# <snip>
{
"fullName":"install",
"name":"install",
"type":"GLOBAL_TARGET"
}
] # end of tragets list
} # end of one configuration object
], # end of configurations list
"currentBuildDirectory":"/tmp/cmake-build-test/Source/CursesDialog/form",
"currentSourceDirectory":"/home/code/src/cmake/Source/CursesDialog/form",
"name":"CMAKE_FORM"
}, # end of one project object
# <snip>
] # end of project list
}
]== CMake MetaMagic ==]
Is this the information you need for IDE integration?
Do you cmake developers feel comfortable to expose this information?
The total of the project data from the cmake project is ~102KiB of raw JSON
data.
What is not listed is the build system file list and the CMakeCache. I want to
keep these two separate: I can think of some use cases where that information is
not at all necessary:-)
Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the cmake-developers
mailing list