MantisBT - CMake
View Issue Details
0006776CMakeCMakepublic2008-04-09 02:262016-06-10 14:30
Dieter Oberkofler 
Brad King 
normalfeatureN/A
closedmoved 
CMake-2-6 
 
0006776: Add option to automatically redirect output to a log file when running CMake in batch job
It would be extraordinary helpful to have a simple way (option) allowing CMake to generate makefile that automatically redirect the output (compile and link) to an error file.
When using CMake in our distributed build environment it is important to check the results of the compile and link processes and this is still best done by creating individual log (error) files by redirecting the output of the compile and link commands.
This is currently only possible by replacing the native compile and link executable with a stub application that takes care of redirecting and is quite complex to build and maintain.
No tags attached.
has duplicate 0008850closed Bill Hoffman makefile output usability on parallel builds 
Issue History
2008-04-09 02:26Dieter OberkoflerNew Issue
2008-08-19 14:25Bill HoffmanStatusnew => assigned
2008-08-19 14:25Bill HoffmanAssigned To => Bill Hoffman
2008-10-01 13:29Bill HoffmanAssigned ToBill Hoffman => Brad King
2009-07-16 08:42Alexandre FeblotNote Added: 0016879
2009-07-21 08:35Brad KingRelationship addedrelated to 0008850
2009-07-21 08:36Brad KingRelationship replacedhas duplicate 0008850
2009-07-21 08:39Brad KingNote Added: 0016918
2009-07-21 08:39Brad KingSeverityminor => feature
2009-07-21 09:02Brad KingNote Added: 0016919
2009-07-21 09:04Brad KingNote Added: 0016920
2009-07-21 09:08Brad KingNote Added: 0016921
2009-07-21 09:08Brad KingNote Edited: 0016921
2012-08-13 10:36Brad KingStatusassigned => backlog
2012-08-13 10:36Brad KingNote Added: 0030492
2016-06-10 14:27Kitware RobotNote Added: 0041420
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0016879)
Alexandre Feblot   
2009-07-16 08:42   
Maybe this feature request is connected:
http://public.kitware.com/Bug/view.php?id=8850 [^]
(0016918)
Brad King   
2009-07-21 08:39   
I've closed 0008850 as a duplicate of this feature request.
(0016919)
Brad King   
2009-07-21 09:02   
CMake does not directly drive the build, but rather generates files
for a platform's native build tool.

This issue is a limitation of the class of native build tools known as
"make". The real fix is to implement a make tool that produces
readable output.
(0016920)
Brad King   
2009-07-21 09:04   
The best CMake can do is work around the limitation. In CVS HEAD
CMake there are new global, directory, and target properties called
"RULE_LAUNCH_COMPILE", "RULE_LAUNCH_LINK", and "RULE_LAUNCH_CUSTOM":

  RULE_LAUNCH_COMPILE
       Specify a launcher for compile rules.

       Makefile generators prefix compiler commands with the given
       launcher command line. This is intended to allow launchers to
       intercept build problems with high granularity. Non-Makefile
       generators currently ignore this property.

  RULE_LAUNCH_CUSTOM
       Specify a launcher for custom rules.

       Makefile generators prefix custom commands with the given
       launcher command line. This is intended to allow launchers to
       intercept build problems with high granularity. Non-Makefile
       generators currently ignore this property.

  RULE_LAUNCH_LINK
       Specify a launcher for link rules.

       Makefile generators prefix link and archive commands with the
       given launcher command line. This is intended to allow
       launchers to intercept build problems with high granularity.
       Non-Makefile generators currently ignore this property.

These properties are building blocks to make use of wrapper scripts
easier. This is as far as CMake goes. CTest picks up from there, but
users can set these properties themselves too.
(0016921)
Brad King   
2009-07-21 09:08   
CTest takes the ball from this point in order to report granular build
results to CDash. Add this code to your project:

  set(CTEST_USE_LAUNCHERS 1)
  include(CTest)

If you already do include(CTest) and have a CTestConfig.cmake file in
the source tree you can also set CTEST_USE_LAUNCHERS in that file.
Then run

  ctest -M Experimental -T Start -T Build

at the top of the build tree. Every compilation, custom command, and linker
invocation is wrapped by a ctest launcher which reports stdout, stderr, and
other information separately. The Testing/<date>-<time> directory will
contain the results.

(0030492)
Brad King   
2012-08-13 10:36   
Sending issues I'm not actively working on to the backlog to await someone with time for them.

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 or contributor who has the bandwidth to take it on.
(0041420)
Kitware Robot   
2016-06-10 14:27   
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.