diff options
author | Brad King <brad.king@kitware.com> | 2024-05-29 14:20:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-05-30 18:23:47 (GMT) |
commit | f26e8886b377757d862fd8db79715bbb0cb8740e (patch) | |
tree | 64de27004d98aec9749b3dc74a4ab56aae698688 /Tests/CMakeGUI | |
parent | fd8c782ded5fac81166ea619b060416d8a756527 (diff) | |
download | CMake-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.txt | 5 |
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 |