View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015490CMake(No Category)public2015-04-01 16:252016-06-10 14:31
ReporterStephen Kelly 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015490: Provide a stable interface to the cmake cache for external tooling
Description
External tooling typically parses the CMakeCache.txt file directly in order to extract essential information. The format of the file, and how to parse it are not documented, and it does not have documented stability guarantees.

There is a need for tooling to read (and possibly write) cache values, so some stable interface should be provided. That can either mean

1) A new format in a new file
2) Documenting the existing format.

The first option has the advantage that a common format for structured documents can be chosen (such as json).

The second option has the advantage that external tooling does not need to wait for a new CMake version to generate a new file, because the existing format has not changed in a long time (and maybe can't change because of de-facto stability requirements for existing tools).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0038386)
Stephen Kelly (developer)
2015-04-01 16:30
edited on: 2015-04-01 16:30

http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/12658/focus=12868 [^]

Another idea is a command line interface which prints requested values on stdout. Mentioned somewhere here, along with reasons this stable interface is needed:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/12658/focus=12784 [^]

(0038389)
David Cole (manager)
2015-04-01 16:38

I vote for option number 2 -- documenting the existing format.

It's not hard to parse. CMake does it all the time...

It would be silly to change CMake just for convenience of external tools when they have to deal with multiple versions of CMake in the wild anyhow.
(0038390)
Tobias Hunger (reporter)
2015-04-02 06:21
edited on: 2015-04-02 08:10

As one possible consumer of said file: I'd prefer option 1.

A new file keeps the CMake internals nicely separate of the information you provide to 3rd party tools, can be written in a format that does not require a custom parser.

PS: Those "-ADVANCED" variables should be hidden away in a non-public place:-)

(0038391)
Anton Makeev (reporter)
2015-04-02 07:51

1) A new format in a new file

This option assumes that this file is either read-only, or CMake will have to decide which file to prefer when regenerating the project - CMakeCache.txt or this new file

2) Documenting the existing format.

It's easily parseable by both the code and by the user, making it versatile.
My vote for documenting what we have now.
(0038392)
Tobias Hunger (reporter)
2015-04-02 08:13

Yes, I think this should be a *read-only* interface. You can already run cmake and other tools to change settings.

Stephen, Anton and me are discussing an IDE-metadata file. In my opinion that would be the best place to put a read-only dump of the configuration. That way an IDE only needs to read one file in one format.
(0038393)
Stephen Kelly (developer)
2015-04-02 12:57

I believe I have a solution for the problems mentioned, but I want to do some more research before posting an updated design.
(0042749)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-04-01 16:25 Stephen Kelly New Issue
2015-04-01 16:30 Stephen Kelly Note Added: 0038386
2015-04-01 16:30 Stephen Kelly Note Edited: 0038386
2015-04-01 16:38 David Cole Note Added: 0038389
2015-04-02 06:21 Tobias Hunger Note Added: 0038390
2015-04-02 07:51 Anton Makeev Note Added: 0038391
2015-04-02 08:10 Tobias Hunger Note Edited: 0038390
2015-04-02 08:13 Tobias Hunger Note Added: 0038392
2015-04-02 12:57 Stephen Kelly Note Added: 0038393
2016-06-10 14:29 Kitware Robot Note Added: 0042749
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team