[CMake] CTest mistakenly marks lines from build output as errors

David Cole david.cole at kitware.com
Fri Aug 17 06:24:08 EDT 2012


That variable exists already, but it is named "CTEST_CUSTOM_ERROR_EXCEPTION"

See this wiki page:

  http://cmake.org/Wiki/CMake/Testing_With_CTest#Customizing_CTest

Put that variable in a file called CTestCustom.cmake in your build tree.
CTEST_CUSTOM_ERROR_EXCEPTION and the variables like it are lists of regular
expressions.

See also this blog post of mine from quite a while back (but still
relevant):

  http://www.kitware.com/blog/home/post/27


Cheers,
David


On Fri, Aug 17, 2012 at 4:49 AM, Kay-Uwe 'Kiwi' Lorenz
<kay at moduleworks.com>wrote:

> Hi,
>
> we are using cmake in big build environment with Visual Studio and
> Xoreax IncrediBuild. For debugging purpose we have turned on printing
> commandlines in IncrediBuild. This produces lines like:
>
> Generating res/resource_config.h
> --------------------**Configuration: MachSimIntegrationSample -
> Release|x64------
> |    i:\kiwi\migration\tools\cmake\**bin\cmake.exe -E make_directory
> I:/kiwi/migration/tmp/dev-**VS2008_x64_no-SCL/Binaries/**lib/Release
> |   if errorlevel 1 goto :VCReportError
> |
> |   if errorlevel 1 goto VCReportError
> |   goto VCEnd
> |   :VCReportError
> |   echo Project : error PRJ0019: A tool returned an error code:
> "Performing Pre-Link Event..."
> |   exit 1
> |   :VCEnd
> Performing Pre-Link Event...
>
> Where the lines starting with "|" are the commands. In CDash now
> the line
>     |   echo Project : error PRJ0019: A tool returned an error code:
> "Performing Pre-Link Event..."
> is marked as error, because one of the predefined patterns match this line.
>
> So we need
>
> a) either the opportunity to tell ctest not to use any predefined
>    error, warning, exception, etc. patterns for grepping out error
>    lines (and then setup a custom set)
>
> b) or the opportunity to filter the lines passed to ProcessSingleLine()
>    where they are marked as error, warning, etc.
>
>    e.g. CTEST_CUSTOM_BUILDLOG_SKIP=<**first-pattern>;<second-**pattern>
>
>    Then I could set
>        CTEST_CUSTOM_BUILDLOG_SKIP=^\\**|
>
> What do you think? I would prefer b).
>
> I could implement it on my own, but I would rather not like to have a
> "custom cmake"
> in production.
>
> For now we can turn off to display commands, but this complicates
> debugging.
>
> Kind regards
> Kiwi
>
> --
>
> Kay-Uwe (Kiwi) Lorenz
> IT Department
> ModuleWorks GmbH
> Ritterstr. 12a
> 52072 Aachen
> Germany
>
> HRB 11871
> Amtsgericht Aachen
> Geschäftsführer Yavuz Murtezaoglu
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120817/782a7e22/attachment-0001.htm>


More information about the CMake mailing list