From fa157c553b6e12716a95b2465be5ff12ac4bf1c8 Mon Sep 17 00:00:00 2001
From: Rashad Kanavath <rashad.kanavath@c-s.fr>
Date: Thu, 3 Aug 2017 14:48:54 +0200
Subject: [PATCH] WRG: hide msvc D9025 warning on dashboard

This bitching warning seems too annoying on dashboard
superbuild-contrib build. total number of warnings seems
300. This magic number is the maximum number of dashboard
warnings in OTB. superbuild usually set max warnings to zero
in their CTestCustom.cmake.in. But here the issue is when
doing superbuild-contrib we switch binary directory to OTB
and run configure, build, install from it and not from
SuperBuild binary directory.

The case about D9025 warning on msvc is actually a misconfig
in the list of arguments passed. The related cause is from
Modules/ThirdParty/6S/src/CMakeLists.txt where we force /Ob1
flag for msvc > 1800. the change is decorated with
enough inline docs. As this is a commandline warning, it cannot
be silenced using #pragma and moreover it is important to show
it to user. But for dashboard case, it is too annoying for
developers
---
 CMake/CTestCustom.cmake.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CMake/CTestCustom.cmake.in b/CMake/CTestCustom.cmake.in
index 612027d6e5..ee0691aedf 100644
--- a/CMake/CTestCustom.cmake.in
+++ b/CMake/CTestCustom.cmake.in
@@ -86,6 +86,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
   # Ignore clang's summary warning, assuming prior text has matched some
   # other warning expression:
   "[0-9,]+ warnings? generated."
+  "cl...Command.line.warning.D9025"
   ".*include.opencv2.*warning.*"
   ".*include.opencv2.*note.*"
   ".*include.kml.*warning.*"
-- 
GitLab