MantisBT - CMake
View Issue Details
0015725CMakeCMakepublic2015-09-03 12:112016-02-01 09:10
Gregory Kramida 
 
normalfeatureN/A
closedwon't fix 
CMake 3.3.1 
 
0015725: post generate action
It would be great if users had the ability to schedule processes after the generation step.

There are many ways, i.e. adding another command, but I guess the easiest way to achieve that would be by extending the execute_process command with something like a SCHEDULE_AFTER_GENERATION flag.
See http://www.cmake.org/pipermail/cmake/2010-May/037151.html [^]
See comments in answer here http://stackoverflow.com/questions/7091447/run-command-after-generation-step-in-cmake [^]
No tags attached.
Issue History
2015-09-03 12:11Gregory KramidaNew Issue
2015-09-09 09:26Brad KingNote Added: 0039375
2015-09-09 16:15Gregory KramidaNote Added: 0039382
2015-09-09 16:16Gregory KramidaNote Edited: 0039382bug_revision_view_page.php?bugnote_id=39382#r1884
2015-09-09 16:22Gregory KramidaNote Edited: 0039382bug_revision_view_page.php?bugnote_id=39382#r1885
2015-09-09 16:26Brad KingNote Added: 0039383
2015-09-09 16:26Brad KingStatusnew => resolved
2015-09-09 16:26Brad KingResolutionopen => won't fix
2016-02-01 09:10Robert MaynardNote Added: 0040393
2016-02-01 09:10Robert MaynardStatusresolved => closed

Notes
(0039375)
Brad King   
2015-09-09 09:26   
For what would such a hook be used? We do *not* want to allow projects to try to do their own updates on the CMake-generated files. Such projects would break if we change the way the files are generated. If there is some useful change that can be made to the generated files then one should contribute a feature to CMake to generate it that way directly instead.
(0039382)
Gregory Kramida   
2015-09-09 16:15   
(edited on: 2015-09-09 16:22)
Well, I don't know... Here goes.

The way that CMake generates eclipse CDT projects causes issues when it comes to working with the source & header files.

Please take a look at this "bug" here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=471990 [^]

The only way I see to solve it is to add a filter (as reported above) on the [Subprojects] virtual folder. The filter gets removed every time the project is re-generated with CMake. The only work-around I could think of was writing a python script that would add the filter manually to the .project XML file. This script would need to be triggered after the project is generated with CMake.

If you think there's no sense in adding post-generation steps, then should I report this as a bug instead?

(0039383)
Brad King   
2015-09-09 16:26   
Re 0015725:0039382:

> way that CMake generates eclipse CDT projects causes issues

CMake should be fixed to resolve this. Any filtering you add in a post-generate step could be broken at any time by CMake changing details of the project generation.

There are a few other open issues in this issue tracker about Eclipse projects. Please search for them to see if this has already been reported and otherwise open a separate issue.
(0040393)
Robert Maynard   
2016-02-01 09:10   
Closing resolved issues that have not been updated in more than 4 months.