[CMake] How to ignore configure warnings in a ctest run?

Matthias Kretz kretz at kde.org
Tue May 29 15:09:47 EDT 2012


Thanks for that workaround. Will do that...

Here's an idea how the dashboard could be improved:
When I open the configure warnings page on the dashboard there could be a 
button to mark the warning as expected. From then on, for every build with the 
same "build name" and "site" the warning would be hidden. If the warning goes 
away a warning appears, showing what warning message was expected.

Regards,
  	Matthias

On Tuesday 29 May 2012 14:39:54 David Cole wrote:
> CDash "configure" warnings are computed dynamically by CDash based only on
> the configure output itself with php code like this:
> 
>     $pos1 = strpos($log, 'CMake Warning', $position);
>     $pos2 = strpos($log, 'Warning:', $position);
> 
> (see CDash/models/buildconfigure.php for more details)
> 
> So the only way to avoid them showing up on CDash is to avoid emitting the
> warnings in the first place.
> 
> 
> You can use code like this in your CMakeLists file if you wish to show the
> warning only for non-dashboard builds:
> 
>   if("$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
>     # developer (non-dashboard) build
>     message(WARNING "show warning to real user")
>   else()
>     # dashboard build
>     message(STATUS "avoiding warning on dashboard")
>   endif()
> 
> That environment variable is set by ctest only when it is running a
> dashboard via the -D command line options, or via a -S script.
> 
> 
> HTH,
> David
> 
> On Fri, May 25, 2012 at 5:38 AM, Matthias Kretz <kretz at kde.org> wrote:
> > Hi,
> > 
> > in my project I added a few warnings to tell users of the library about
> > compiler issues or such. But when I run a nightly build with such a
> > compiler I
> > really don't care to see that warning (well, rather I'd like to see a
> > warning
> > if the warning is missing) on the dashboard. But I didn't succeed in
> > ignoring
> > the warning yet. It appears that CTEST_CUSTOM_WARNING_EXCEPTION is not
> > used
> > for configure output, is it?
> > Do you know of any way to do it, or would it be possible to have some way
> > to
> > do it in a future version?
> > 
> > Regards,
> > 
> >        Matthias
> > 
> > --
> > ________________________________________________________
> > Matthias Kretz (Germany)                            <><
> > http://kretzfamily.de/
> > 
> > --
> > 
> > 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
-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://kretzfamily.de/



More information about the CMake mailing list