I'm creating a custom target to get XML output from my Boost.test test
cases for use in Hudson, and I want the output for all tests to be
generated even if some fail.
Unfortunately there are two blockers:
1. cmake makes the first test case to fail stop the build.
2. cmake offers no way to redirect output and using ">" doesn't
seem to work.
Is there a way to tell cmake to:
1. Redirect output from a custom command?
2. Ignore the return status from a custom command?
Here's my CMakeLists.txt fragment, where exeFiles holds the list of test
case executables:
foreach(exeName ${exeFiles})
list(APPEND xmlList ${exeName}.xml)
add_custom_command(OUTPUT ${exeName}.xml
COMMAND ${exeName} --output_format=XML --log_level=all
--report_level=no
>${exeName}.xml VERBATIM)
endforeach()
add_custom_target(xmltest DEPENDS ${xmlList})
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake