summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeGUI
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-05-29 14:20:46 (GMT)
committerBrad King <brad.king@kitware.com>2024-05-30 18:23:47 (GMT)
commitf26e8886b377757d862fd8db79715bbb0cb8740e (patch)
tree64de27004d98aec9749b3dc74a4ab56aae698688 /Tests/CMakeGUI
parentfd8c782ded5fac81166ea619b060416d8a756527 (diff)
downloadCMake-f26e8886b377757d862fd8db79715bbb0cb8740e.zip
CMake-f26e8886b377757d862fd8db79715bbb0cb8740e.tar.gz
CMake-f26e8886b377757d862fd8db79715bbb0cb8740e.tar.bz2
cmake-gui: Suppress MSVC deprecation warnings from Qt headers
MSVC 14.38+ toolsets deprecate `stdext::checked_array_iterator`. Support building with versions of Qt that have not been updated to avoid the deprecated API. Qt-Issue: https://bugreports.qt.io/browse/QTBUG-118993
Diffstat (limited to 'Tests/CMakeGUI')
-rw-r--r--Tests/CMakeGUI/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/CMakeGUI/CMakeLists.txt b/Tests/CMakeGUI/CMakeLists.txt
index 4e8609b..c9f44e9 100644
--- a/Tests/CMakeGUI/CMakeLists.txt
+++ b/Tests/CMakeGUI/CMakeLists.txt
@@ -2,6 +2,11 @@ include(CMakeParseArguments)
find_package(Qt5Test REQUIRED)
+if(MSVC)
+ # QTBUG-118993: Qt uses deprecated stdext::checked_array_iterator
+ add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
+endif()
+
include_directories(
${CMake_SOURCE_DIR}/Source
${CMake_SOURCE_DIR}/Source/QtDialog