[cmake-developers] Extracting target metadata, IDE integration
Brad King
brad.king at kitware.com
Fri Oct 17 08:57:18 EDT 2014
On 10/17/2014 06:44 AM, Tobias Hunger wrote:
> On Mon, Sep 22, 2014 at 4:03 PM, Stephen Kelly <steveire at gmail.com> wrote:
>> Afaik, CMake does not know all the files included by your cpp files.
>> However, some buildsystems can add them to the list of sources if desired
>> for better IDE integration.
>>
>> https://gitorious.org/grantlee/grantlee/commit/3eb40cf94
>
> That is the big issue I have with CMake... it makes it impossible to use
> CMakeLists.txt as a sole source of project configuration.
>
> Creator tries to not need any extra files to manage the project, so this
> hits us pretty hard.
We've discussed this in the past a few times. One solution is for
the project spec to be in a declarative format, e.g. a JSON document.
The spec would not be in a CMakeLists.txt but could be loaded by a
command invoked from it. Then it could also be loaded and manipulated
separately by IDEs or other tools.
So, rather than having CMake generate a project spec file from the
CMakeLists.txt files, we have CMakeLists.txt files load a project
spec file. The declarative information goes in the project spec file,
and imperative things like try_compile can be done in the CMake config
step. The imperative step also loads the project spec and evaluates
the declarations based on discovered information about the target
platform.
Other than this basic design, no one has taken the time to design such
a format.
-Brad
More information about the cmake-developers
mailing list