From 9e0ff8e55dab4520ae2ac3f19614d0a379faedf3 Mon Sep 17 00:00:00 2001
From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
Date: Tue, 7 Sep 2021 18:36:40 -0700
Subject: [PATCH] disabling external headers for analyzer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
---
cmake/Platform/Common/MSVC/Configurations_msvc.cmake | 1 +
cmake/Platform/Common/MSVC/Directory.Build.props | 2 ++
2 files changed, 3 insertions(+)
diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake
index c613b79d87..01e3063028 100644
--- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake
+++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake
@@ -136,6 +136,7 @@ endif()
ly_set(LY_CXX_SYSTEM_INCLUDE_CONFIGURATION_FLAG
/experimental:external # Turns on "external" headers feature for MSVC compilers
/external:W0 # Set warning level in external headers to 0. This is used to suppress warnings 3rdParty libraries which uses the "system_includes" option in their json configuration
+ /analyze:external- # disable analysis on external headers
)
if(NOT CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
ly_set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX /external:I)
diff --git a/cmake/Platform/Common/MSVC/Directory.Build.props b/cmake/Platform/Common/MSVC/Directory.Build.props
index 4b82cd7048..589e14a6cb 100644
--- a/cmake/Platform/Common/MSVC/Directory.Build.props
+++ b/cmake/Platform/Common/MSVC/Directory.Build.props
@@ -22,6 +22,8 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
handles external headers in MSVC, we can remove that code and this
-->
TurnOffAllWarnings
+
+ true