I encountered an unexpected build failure in a superbuild project today, and after investigation with the help of ngladitz on #cmake, we got to the bottom of the problem.
http://blogs.msdn.com/b/dsvc/archive/2012/02/29/output-from-exec-task-resulting-in-build-failure.aspx When cmake runs an external command in the build, if that command outputs to stdout the strings "Error:" or "error:" this will *fail the build* irrespective of the exit status of that command (!). Looks like a horrible design flaw in msbuild, but the implication is that this makes the build quite fragile since any output at all, including test output, output from custom tools and scripts etc., can all cause a build failure. Examples: http://pastebin.ca/3211683 - build failure due to "Error:" and "error:" http://pastebin.ca/3211759 - build success with the output adjusted to remove these strings In both these cases, the tests all pass and ctest returns a zero exit status. The msbuild <Exec> task can use IgnoreStandardErrorWarningFormat="true" to suppress this behaviour. It would probably be appropriate to enable this for all uses other than maybe compiling and linking. We seem to use <CustomBuild>'s <Command> rather than <Exec>; if the flag works for both elements that would be great, but I'm afraid I'm not an expert in the internals of msbuild and I couldn't find any obvious documentation for <CustomBuild>. If this could be made to ignore what's on stdout/err when running unit tests and other non-build/link tasks that would be really great. Regards, Roger -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
