MantisBT - CMake
View Issue Details
0013359CMakeCMakepublic2012-06-28 07:112016-06-10 14:31
tetractius 
Kitware Robot 
urgentmajoralways
closedmoved 
AllAllAll
CMake 2.8.8 
 
0013359: Feature Request: performing the "Configure" step but not Generation with cmake command line tool (as in cmake-gui and ccmake)
Feature Request: possibility to perform only the "Configure" step but not Generation with cmake command line tool (as is possible in cmake-gui and ccmake).

I'm dealing with a very huge project (around 150 targets). Each target is defined in its own CMakeLists.txt inside the hierarchy and defines some variable for exposing some functionality related to the target its self (i.e. include path needed for using a library). But we have some cross dependencies.

Because of that we have to perform a 2 step generation for creating the right cache.

From the developer perspective, if a change to a cache variable is required, sometime is easier to change the value in the CMakeLists.txt, remove the cache and rerun the configure/generate step, than surfing in the huge CMakeCache.txt or cmake-gui

The problem when I use cmake command line is that in the "first" step (with previous CMakeCache.txt deleted) I will obtain:
- the intermediate CMakeCache.txt to be used for the second step (this is exactly what I want)
- the first intermediate (incomplete) version of building configuration (Makefile, vcproj).

Doing this, when I run the compilation it will recompile the whole project (even files that don't need to be recompiled) because of huge changes in the building configurations.

Instead, if for the first step I run only the configure step (by cmake-gui or by cmake sending an error), no build configuration are generated in the first step, and the resultant build conf of the complete second step (no artificial errors) rebuild only what is possibly really needed to be recompiled.

So shortly: for automation purpose would be nice to have a cmake tool command line parameter (i.e. --build_cache_only) for configuring only the cache but not writing makefiles/vcproj exactly as cmake-gui/ccmake can do.

Our current way is to "SEND_ERROR" during first generation only causing that only the intermediate cache is generated (but not build configuration files written)
A sample of the cmake command line parameter that would be nice to have
might be :

cmake --build_cache_only

or simply:

cmake --configure (consistent with the cmake-gui)
No tags attached.
patch 0013359.patch (3,797) 2013-08-08 10:05
https://public.kitware.com/Bug/file/4841/0013359.patch
Issue History
2012-06-28 07:11tetractiusNew Issue
2012-06-28 07:19Eric NOULARDNote Added: 0029856
2012-06-28 07:25tetractiusNote Added: 0029857
2012-06-28 11:23David ColeNote Added: 0029859
2012-08-11 21:42David ColeStatusnew => backlog
2012-08-11 21:42David ColeNote Added: 0030452
2013-08-08 10:05tetractiusFile Added: 0013359.patch
2013-08-08 10:06tetractiusNote Added: 0033683
2013-08-08 10:09tetractiusNote Edited: 0033683bug_revision_view_page.php?bugnote_id=33683#r1227
2013-08-08 10:18tetractiusNote Edited: 0033683bug_revision_view_page.php?bugnote_id=33683#r1228
2013-08-08 10:18tetractiusNote Edited: 0033683bug_revision_view_page.php?bugnote_id=33683#r1229
2013-08-08 10:18tetractiusNote Edited: 0033683bug_revision_view_page.php?bugnote_id=33683#r1230
2013-08-08 10:19tetractiusNote Edited: 0033683bug_revision_view_page.php?bugnote_id=33683#r1231
2014-07-18 03:23BartoszNote Added: 0036409
2014-07-18 03:24BartoszNote Edited: 0036409bug_revision_view_page.php?bugnote_id=36409#r1525
2016-06-10 14:28Kitware RobotNote Added: 0042073
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0029856)
Eric NOULARD   
2012-06-28 07:19   
This is linked to the discussion on the ML:
http://www.cmake.org/pipermail/cmake/2012-June/050831.html [^]

Where I suggested (as a workaround) the following command line:
echo "c q" | ccmake ..
(0029857)
tetractius   
2012-06-28 07:25   
Hi Eric. Thanks for the quick reply. I went trough your suggestion. It works, but is still not easily suitable for automation purpose. Indeed sometimes happens that we have some syntax errors in CMakeLists.txt and in that case our continuous integration system would hangs indefinitely, while we would like to have the error log in those cases
(0029859)
David Cole   
2012-06-28 11:23   
I like "--configure" or possibly "--configure-only" as the new command line switch if we implement this
(0030452)
David Cole   
2012-08-11 21:42   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0033683)
tetractius   
2013-08-08 10:06   
(edited on: 2013-08-08 10:19)
I am currently using the attached patch. Could this be reviewed and integrated?

It simply adds the "--configure-only" command parameter for creating a CMakeCache.txt without proceed to the generation of project files.

If this process is successful a normal generation that follow is however faster.

(0036409)
Bartosz   
2014-07-18 03:23   
(edited on: 2014-07-18 03:24)
Is any change to push this patch to cmake repository?

I have similar project as Eric (huge project, with a lot of cross dependencies) and we need CMakeCache.txt to be filled.
Currently we are using SEND_ERROR message, but it causing a lot of problems (CI etc.).
We prefer to use regular cmake version, that's why we didn't apply this patch (for me it is working perfectly).

Could you please review this patch?
I will apply necessary changes.

(0042073)
Kitware Robot   
2016-06-10 14:28   
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.