[CMake] ctest --build-and-test merges all output to stdout?

Hugo Heden hugoheden at gmail.com
Mon Mar 9 07:13:32 EDT 2009


Good day all,

I am running

   $ ctest --build-and-test ... [etc]

and it seems that ctest *merges* all output from subprocess on to
*stdout* and writes nothing on *stderr*. Is this expected behaviour?
Can I change it? What I would prefer would be for ctest to just "pass
along" whatever the subprocesses print on those streams to *the same
output stream*. (I am trying to write nightly build scripts that relay
information as relevant as possible to various sinks.) Any hints
appreciated!

Just as an example, if I specify a --build-target with incorrect
spelling, the underlying /usr/bin/make will emit an output to
*stderr*, like this:

   $ make spelcheck
   make: *** No rule to make target `spelcheck'.  Stop.

But if I do the same via ctest, that output ends up on  *stdout*:

   $ ctest -VV --debug --build-and-test ../SourceWC/foo .
--build-generator "Unix Makefiles" --build-makeprogram "/usr/bin/make"
--build-project merlin --build-config Debug --build-nocmake
--build-noclean --build-target spelcheck
   /home/kitware/CMakeReleaseDirectory/CMake-2-6-2/Source/ctest.cxx:275
Internal cmake changing into directory: /tmp/build   Change Dir:
/tmp/build
   Run Build Command:/usr/bin/make "spelcheck"
   make: *** No rule to make target `spelcheck'.  Stop.

Best regards

Hugo Heden


More information about the CMake mailing list