[cmake-developers] Generating buildsystem metadata from CMake

Stephen Kelly steveire at gmail.com
Tue Mar 31 18:17:23 EDT 2015


Anton Makeev wrote:

> Agree, the IDE should not do any automatic stuff, when user doesn’t expect
> it. Though, the use-case here is quite different:
> Consider a project that have 'add_directory(missing_dir)’ in one of the
> CMakeLists files. If IDE were aware that missing_dir/CMakeLists.txt is a
> required file, it might then automatically trigger update, when the user
> creates this file inside the IDE (not externally). Or it may even have a
> quick-fix ‘Create missing CMakeList.txt’.

Interesting. Thanks for that description.

>>> Project name, list of the configurations are most needed ones.
>>> We also use CMAKE_<lang>_SOURCEFILE_EXTENSIONS to determine if a given
>>> file is potentially source file or not.
>> 
>> As CMake already knows which files are 'object sources', the metadata
>> will provide that. Also, the <lang> extensions is not enough. See the
>> unit test I created and in particular the compiled_as_cxx.c file.
> 
> For the existing files we indeed have all the necessary info in the
> proposed format. Though, it’s about newly-created files: when a user
> creates a new file ‘foo.zxy', IDE should decide,
> wether to add it  (or suggest to) to a target or not. The list of source
> files extensions is what may help here.

I see.

> It comes from CMAKE_CONFIGURATION_TYPES, if project defined such a
> variable. With default of Debug/Release/RelWithDebInfo/MinSizeRel

Ok.

So does this mean you have a parser for the existing CMakeCache.txt format 
already?

Thanks,

Steve.




More information about the cmake-developers mailing list