summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-05-31 13:52:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-05-31 13:52:15 (GMT)
commit719b461b9c5a79f2946ee010deb16dd130570ada (patch)
treea1756ea83a86591f42c22a82330bb841711eef24 /Tests
parente2a3a0ad4bad30227057add6baeb160a3560cc1b (diff)
parent0070708ae1b38eb5d396a19996c522271f7280c2 (diff)
downloadCMake-719b461b9c5a79f2946ee010deb16dd130570ada.zip
CMake-719b461b9c5a79f2946ee010deb16dd130570ada.tar.gz
CMake-719b461b9c5a79f2946ee010deb16dd130570ada.tar.bz2
Merge topic 'ci-msvc-14.40'
0070708ae1 gitlab-ci: Update Windows builds to MSVC 14.40 toolset 41e777274a Tests: Update BuildDepends test for VS 17.10 f26e8886b3 cmake-gui: Suppress MSVC deprecation warnings from Qt headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9560
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BuildDepends/CMakeLists.txt35
-rw-r--r--Tests/CMakeGUI/CMakeLists.txt5
2 files changed, 27 insertions, 13 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 99418df..2fa2bc5 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -12,6 +12,15 @@ project(BuildDepends)
# project is built.
set(CMAKE_SUPPRESS_REGENERATION 1)
+if(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_VS_PLATFORM_TOOLSET MATCHES "^(v90|v100|v110|v120|v140)$")
+ # These toolsets update 'link_depends_no_shared_lib.lib' during rebuild in Release mode.
+ set(config Debug)
+else()
+ # Some toolsets update 'link_depends_no_shared_lib.pdb' during rebuild in Debug mode.
+ set(config Release)
+endif()
+set(CMAKE_TRY_COMPILE_CONFIGURATION "${config}")
+
# Xcode needs some help with the fancy dependencies in this test.
if(XCODE AND XCODE_VERSION VERSION_LESS 5)
set(HELP_XCODE 1)
@@ -117,10 +126,10 @@ endif()
# find and save the ninjadep executable
set(ninjadep ${BuildDepends_BINARY_DIR}/Project/ninjadep${CMAKE_EXECUTABLE_SUFFIX})
if(EXISTS
- "${BuildDepends_BINARY_DIR}/Project/Debug/ninjadep${CMAKE_EXECUTABLE_SUFFIX}" )
- message("found debug")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/ninjadep${CMAKE_EXECUTABLE_SUFFIX}" )
+ message("found ${config}/ninjadep${CMAKE_EXECUTABLE_SUFFIX}")
set(ninjadep
- "${BuildDepends_BINARY_DIR}/Project/Debug/ninjadep${CMAKE_EXECUTABLE_SUFFIX}")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/ninjadep${CMAKE_EXECUTABLE_SUFFIX}")
endif()
message("Running ${ninjadep} ")
execute_process(COMMAND ${ninjadep} OUTPUT_VARIABLE out RESULT_VARIABLE runResult)
@@ -136,17 +145,17 @@ endif()
set(bar ${BuildDepends_BINARY_DIR}/Project/bar${CMAKE_EXECUTABLE_SUFFIX})
if(EXISTS
- "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" )
- message("found debug")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/bar${CMAKE_EXECUTABLE_SUFFIX}" )
+ message("found ${config}/bar${CMAKE_EXECUTABLE_SUFFIX}")
set(bar
- "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/bar${CMAKE_EXECUTABLE_SUFFIX}")
endif()
set(zot ${BuildDepends_BINARY_DIR}/Project/zot${CMAKE_EXECUTABLE_SUFFIX})
if(EXISTS
- "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" )
- message("found debug")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/zot${CMAKE_EXECUTABLE_SUFFIX}" )
+ message("found ${config}/zot${CMAKE_EXECUTABLE_SUFFIX}")
set(zot
- "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/zot${CMAKE_EXECUTABLE_SUFFIX}")
endif()
message("Running ${bar} ")
@@ -305,12 +314,12 @@ if(NOT RESULT)
message(SEND_ERROR "Could not build test project (2)!")
endif()
if(EXISTS
- "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" )
- message("found debug")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/bar${CMAKE_EXECUTABLE_SUFFIX}" )
+ message("found ${config}/bar${CMAKE_EXECUTABLE_SUFFIX}")
endif()
if(EXISTS
- "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" )
- message("found debug")
+ "${BuildDepends_BINARY_DIR}/Project/${config}/zot${CMAKE_EXECUTABLE_SUFFIX}" )
+ message("found ${config}/zot${CMAKE_EXECUTABLE_SUFFIX}")
endif()
message("Running ${ninjadep} ")
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