summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-09-01 20:58:58 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-09-01 20:58:58 (GMT)
commitc35d1927a58366c56beb320835eb9366d0dccd70 (patch)
tree47fdcea8d38d7c1beef945530662f57c2f90ed72
parent7da3c744e3f39bb19358fd2f19807443c89919af (diff)
downloadCMake-c35d1927a58366c56beb320835eb9366d0dccd70.zip
CMake-c35d1927a58366c56beb320835eb9366d0dccd70.tar.gz
CMake-c35d1927a58366c56beb320835eb9366d0dccd70.tar.bz2
Tests: Pass additional Qt information to Ninja and NMC tests
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake2
3 files changed, 4 insertions, 3 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 470f302..ec4c7b5 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -143,14 +143,14 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
list(APPEND Ninja_ARGS -DTEST_Fortran=1)
endif()
if(CMake_TEST_Qt5 AND Qt5Core_FOUND)
- list(APPEND Ninja_ARGS -DCMake_TEST_Qt5=1 -DCMAKE_TEST_Qt5Core_Version=${Qt5Core_VERSION})
+ list(APPEND Ninja_ARGS -DCMake_TEST_Qt5=1 -DQt5Core_DIR=${Qt5Core_DIR} -DCMAKE_TEST_Qt5Core_Version=${Qt5Core_VERSION})
endif()
add_RunCMake_test(Ninja)
set(NinjaMultiConfig_ARGS
-DCYGWIN=${CYGWIN}
)
if(CMake_TEST_Qt5 AND Qt5Core_FOUND)
- list(APPEND NinjaMultiConfig_ARGS -DCMake_TEST_Qt5=1)
+ list(APPEND NinjaMultiConfig_ARGS -DCMake_TEST_Qt5=1 -DQt5Core_DIR=${Qt5Core_DIR} -DCMAKE_TEST_Qt5Core_Version=${Qt5Core_VERSION})
endif()
if(DEFINED CMake_TEST_CUDA)
list(APPEND NinjaMultiConfig_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index d43023b..e6f86a1 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -327,6 +327,7 @@ run_ChangeBuildType()
function(run_Qt5AutoMocDeps)
if(CMake_TEST_Qt5 AND CMAKE_TEST_Qt5Core_Version VERSION_GREATER_EQUAL 5.15.0)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Qt5AutoMocDeps-build)
+ set(RunCMake_TEST_OPTIONS "-DQt5Core_DIR=${Qt5Core_DIR}")
run_cmake(Qt5AutoMocDeps)
unset(RunCMake_TEST_OPTIONS)
# Build the project.
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 76b488e..8248925 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -300,7 +300,7 @@ endif()
if(CMake_TEST_Qt5)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Qt5-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all" "-DQt5Core_DIR=${Qt5Core_DIR}")
run_cmake_configure(Qt5)
unset(RunCMake_TEST_OPTIONS)
include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)