Files
qt5/tests/manual/RunCMake/Common.cmake
Alexandru Croitor a848d20880 CMake: Adjust to new location of RunCMakeTestHelpers in qtbase
Adjust the path to where expect to find the QtRunCMakeTestHelpers
module in qtbase.

Replace the usage of 'QtIRRunCMake' with 'RunCMake' in the root test
CMakeLists.txt.

Pass the current source dir as an extra module path to the RunCMake
test, so it can find the Common module without relying on relative
paths, so that any build dir works.

Remove the unnecessary forwarding of CMAKE_SYSTEM_NAME.

Amends e552513c9f

Change-Id: If804bcb36a0bd3df6e4617e56c146094793138c4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-04-02 18:02:06 +01:00

37 lines
1.2 KiB
CMake

# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
set(top_repo_dir_path "${CMAKE_CURRENT_LIST_DIR}/../../..")
get_filename_component(top_repo_dir_path "${top_repo_dir_path}" ABSOLUTE)
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.\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()
macro(qt_ir_setup_test_include_paths)
set(ir_script_path "${top_repo_dir_path}/cmake")
list(APPEND CMAKE_MODULE_PATH
"${ir_script_path}"
"${run_cmake_path}"
)
include(QtIRHelpers)
qt_ir_include_all_helpers()
# RunCMakeTestHelpers from qtbase/src/testinternal/3rdparty/cmake
include(QtRunCMakeTestHelpers)
endmacro()
qt_ir_setup_test_include_paths()
# Used by add_RunCMake_test
set(CMAKE_CMAKE_COMMAND "${CMAKE_COMMAND}")
set(_isMultiConfig FALSE)