diff --git a/tests/manual/RunCMake/CMakeLists.txt b/tests/manual/RunCMake/CMakeLists.txt index f3ade5f8..8510e81a 100644 --- a/tests/manual/RunCMake/CMakeLists.txt +++ b/tests/manual/RunCMake/CMakeLists.txt @@ -8,5 +8,5 @@ enable_testing() include("${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake") add_RunCMake_test(InitRepository - -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} + -DEXTRA_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/tests/manual/RunCMake/Common.cmake b/tests/manual/RunCMake/Common.cmake index 63418cfd..5a5cfa47 100644 --- a/tests/manual/RunCMake/Common.cmake +++ b/tests/manual/RunCMake/Common.cmake @@ -3,9 +3,17 @@ set(top_repo_dir_path "${CMAKE_CURRENT_LIST_DIR}/../../..") get_filename_component(top_repo_dir_path "${top_repo_dir_path}" ABSOLUTE) -if(NOT IS_DIRECTORY ${top_repo_dir_path}/qtbase/cmake/3rdparty/cmake) +set(qtbase_path "${top_repo_dir_path}/qtbase") +set(run_cmake_path "${qtbase_path}/src/testinternal/3rdparty/cmake") +if(NOT IS_DIRECTORY "${qtbase_path}") message(FATAL_ERROR - "qtbase submodule is not initialized or it is missing the QtRunCMakeTestHelpers.\n" + "qtbase submodule is not initialized.\n" + " Cannot run these tests without them." + ) +endif() +if(NOT IS_DIRECTORY "${run_cmake_path}") + message(FATAL_ERROR + "qtbase submodule is missing the QtRunCMakeTestHelpers at ${run_cmake_path}.\n" " Cannot run these tests without them." ) endif() @@ -14,11 +22,11 @@ macro(qt_ir_setup_test_include_paths) set(ir_script_path "${top_repo_dir_path}/cmake") list(APPEND CMAKE_MODULE_PATH "${ir_script_path}" - "${top_repo_dir_path}/qtbase/cmake/3rdparty/cmake" + "${run_cmake_path}" ) include(QtIRHelpers) qt_ir_include_all_helpers() - # RunCMakeTestHelpers from qtbase/cmake/3rdparty/cmake + # RunCMakeTestHelpers from qtbase/src/testinternal/3rdparty/cmake include(QtRunCMakeTestHelpers) endmacro() qt_ir_setup_test_include_paths() diff --git a/tests/manual/RunCMake/InitRepository/RunCMakeTest.cmake b/tests/manual/RunCMake/InitRepository/RunCMakeTest.cmake index a83b192e..bb18bd1a 100644 --- a/tests/manual/RunCMake/InitRepository/RunCMakeTest.cmake +++ b/tests/manual/RunCMake/InitRepository/RunCMakeTest.cmake @@ -2,11 +2,13 @@ # SPDX-License-Identifier: BSD-3-Clause cmake_minimum_required(VERSION 3.16) -include("${CMAKE_CURRENT_SOURCE_DIR}/../Common.cmake") + +list(APPEND CMAKE_MODULE_PATH "${EXTRA_MODULE_PATH}") +include(Common) # The file is included separately from Common.cmake because it has side-effects # that we want to apply only in the RunCMake part of the test. -include(QtIRRunCMake) +include(RunCMake) # Uses prefix set from outside scope. function(run_suite_command name)