From c35d1927a58366c56beb320835eb9366d0dccd70 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Tue, 1 Sep 2020 16:58:58 -0400 Subject: Tests: Pass additional Qt information to Ninja and NMC tests --- Tests/RunCMake/CMakeLists.txt | 4 ++-- Tests/RunCMake/Ninja/RunCMakeTest.cmake | 1 + Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake | 2 +- 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) -- cgit v0.12