1

I am using a CMake / CDash setup up, and am quite satisfied with it overall.

I am also a strong advocate of "builds should not generate warnings".

However, there is one compiler warning being generated on one specific platform that I absolutely, positively cannot do anything about (at this point of time, short of a complete refactoring of the code involved).

I can live with the yellow box on the CDash dashboard, but what's getting on my nerves is that CDash considers compiler warnings to be a failure of the build stage, sending me mails to that effect:

FAILED (w=1): <...> - Linux - Nightly

A submission to CDash for the project <...> has build warnings.

Project: <...>

Site: <...>

Build Name: Linux

Build Time: 2015-04-27T10:01:49 CEST

Type: Nightly

Warnings: 1

How could I set up CDash in a way that compiler warnings are not reported as failures?

I want to receive a "failure" warning only if something actually failed...

Community
  • 1
  • 1
DevSolar
  • 67,862
  • 21
  • 134
  • 209

1 Answers1

1

See the section Customizing CTest on the Testing with CTest wiki page.

Short summary: In the outermost binary build directory create a file CTestCustom.cmake with the following contents:

# Additional regular expressions for warning exceptions during build process
list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning_to_ignore")

warning_to_ignore should be a regular expression matching the one compiler warning being generated on one specific platform that you absolutely, positively cannot do anything about.

sakra
  • 62,199
  • 16
  • 168
  • 151
  • That's it, thank you. The judges are still out on whether the warning is actually a compiler error. ;-) – DevSolar Apr 29 '15 at 14:16