MantisBT - CMake
View Issue Details
0013020CMakeCMakepublic2012-03-06 10:442012-09-03 16:00
Petr Kmoch 
Brad King 
normalminorN/A
closedwon't fix 
 
 
0013020: Custom commands after generation
In multiple situations, I have run into a need to perform some processing after CMake finishes generating the buildsystem (e.g. need to post-process the generated .sln file). Could perhaps add_custom_command() be expanded to allow a third form, like this?
add_custom_command(POST_GENERATION
COMMAND command1 [ARGS] [args1...]
[COMMAND command2 [ARGS] [args2...] ...]
[WORKING_DIRECTORY dir]
[VERBATIM])

It's not enough to have a wrapper script around CMake, as this doesn't get run when CMake re-runs automatically during build because a CMakeList changed.
No tags attached.
Issue History
2012-03-06 10:44Petr KmochNew Issue
2012-03-06 10:56Petr KmochNote Added: 0028845
2012-03-09 09:26Brad KingNote Added: 0028878
2012-03-09 09:26Brad KingStatusnew => resolved
2012-03-09 09:26Brad KingResolutionopen => won't fix
2012-03-09 09:26Brad KingAssigned To => Brad King
2012-09-03 16:00David ColeNote Added: 0030830
2012-09-03 16:00David ColeStatusresolved => closed

Notes
(0028845)
Petr Kmoch   
2012-03-06 10:56   
I'll be happy to try to create a patch, if this doesn't get backlogged.
(0028878)
Brad King   
2012-03-09 09:26   
I don't think post-generation tweaks can be made in a forward-compatible way. If CMake changes the way it generates the file then the tweaks on existing projects may break. That would be too constraining to allow CMake to evolve.

I'd rather teach CMake to generate the file directly with what you need. It looks like 0013021 would be a start to that.
(0030830)
David Cole   
2012-09-03 16:00   
Closing resolved issues that have not been updated in more than 4 months.