MantisBT - CMake
View Issue Details
0014080CMakeCMakepublic2013-04-13 05:512015-08-27 21:32
manday 
 
normalminoralways
closedno change required 
 
 
0014080: add_custom_command does not allow for std* connection
add_custom_command overlaps with execute_process, however, does not allow for the same operations as execute_process. Most notably, it does not allow for connection of stdin, stdout and stderr (and writing them into files).

Bug: add_custom_command should be as least as powerful as execute_process.

Note: It would be preferable if execute_process and add_custom_command were unified, as in their redundancy removed.
No tags attached.
Issue History
2013-04-13 05:51mandayNew Issue
2013-04-15 09:02Brad KingNote Added: 0032830
2013-04-15 09:02Brad KingStatusnew => resolved
2013-04-15 09:02Brad KingResolutionopen => no change required
2013-10-07 10:09Robert MaynardNote Added: 0034031
2013-10-07 10:09Robert MaynardStatusresolved => closed

Notes
(0032830)
Brad King   
2013-04-15 09:02   
The two commands have completely different purposes:

- execute_process() runs synchronously while CMake configures the project. Connecting stdin/out/err works because there is a parent process to connect.

- add_custom_command() adds a rule to be executed by the build system. The stdin/out/err can be redirected to files with "< file", "> file", and "2> file". Alternatively the custom command could run a "${CMAKE_COMMAND} -P myscript.cmake" which does execute_process inside.

Please bring this up on the mailing list for broader discussion if you still have concerns.
(0034031)
Robert Maynard   
2013-10-07 10:09   
Closing resolved issues that have not been updated in more than 4 months.