Hi, I am using CTest to encapsulate automatic build and testing of a microcontroller software and report results to CDash. This process generally works but I am facing a problem with handling configure errors within CTest and CDash.
Configure phase involves several tools besides CMake, so I have created a batch-file and use it as a custom CTEST_CONFIGURE_COMMAND: set(CTEST_CONFIGURE_COMMAND "$ENV{SCRIPT_FOLDER}/configure.bat") When one of configure tools fails, configure.bat exits with a positive return value using 'exit /b %ERRCODE_TOOL%'. If I run configure.bat directly, I can check the desired value is returned by running 'echo %ERRORLEVEL%' after the script finishes. However, when the script is called from CTest script using 'ctest_configure(RETURN_VALUE configure_failed)', the variable configure_failed does not prevent building, although following code is used: if ($ENV{DO_BUILD} AND NOT configure_failed) ctest_build(RETURN_VALUE build_failed) endif($ENV{DO_BUILD} AND NOT configure_failed) Also the report of configure phase in CDash contains: Configure Command: D:/checkout/integration/script//configure.bat Configure Return Value: 0 Configure Output: [configure] ---------- XMLConf ---------- error: Cannot find CFG overlay XML file [configure] Error: XMLConf failed. CDash reports 0 errors and 0 warnings for the configure phase, although the last two lines of configure.bat output go to stderr. What can I do to get configure errors properly reported in my environment? I use Windows 7 64-bit and native CMake 3.5.0. Thanks in advance for any help! Miroslav Matějů -- 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