ConfigureBuildQt: Allow to test with local sources
When using local sources, the sync step is replaced with setting up symlinks to the current source folders. Change-Id: I16500c130b35b962e9d0398498e0c83d71bdc149 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
1cef8ec34c
commit
f73a927bb4
@ -282,6 +282,19 @@ function(setup_qt_sources)
|
|||||||
# Merge stdout with stderr, to avoid having stderr output from git trigger errors.
|
# Merge stdout with stderr, to avoid having stderr output from git trigger errors.
|
||||||
set(RunCMake_TEST_OUTPUT_MERGE TRUE)
|
set(RunCMake_TEST_OUTPUT_MERGE TRUE)
|
||||||
|
|
||||||
|
get_cmake_or_env_or_default(use_local USE_LOCAL_SUBMODULE_SYMLINKS OFF)
|
||||||
|
if(use_local)
|
||||||
|
file(GLOB qt_submodules RELATIVE "${top_level_src_dir}" "${top_level_src_dir}/qt*")
|
||||||
|
foreach(submodule IN LISTS qt_submodules)
|
||||||
|
message(STATUS
|
||||||
|
"Making a symlink of submodule ${submodule} "
|
||||||
|
"pointing to ${top_level_src_dir}/${submodule}"
|
||||||
|
)
|
||||||
|
file(REMOVE_RECURSE "${top_level_src_dir}/${submodule}")
|
||||||
|
file(CREATE_LINK "${top_repo_dir_path}/${submodule}" "${top_level_src_dir}/${submodule}"
|
||||||
|
SYMBOLIC)
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
# Adjust its remote url not to be the local url.
|
# Adjust its remote url not to be the local url.
|
||||||
get_repo_base_url(repo_base_url)
|
get_repo_base_url(repo_base_url)
|
||||||
set(remote_clone_url "${repo_base_url}/qt/qt5.git")
|
set(remote_clone_url "${repo_base_url}/qt/qt5.git")
|
||||||
@ -299,6 +312,7 @@ function(setup_qt_sources)
|
|||||||
)
|
)
|
||||||
|
|
||||||
apply_extra_gerrit_changes()
|
apply_extra_gerrit_changes()
|
||||||
|
endif()
|
||||||
|
|
||||||
file(TOUCH "${working_dir}/sources_synced.txt")
|
file(TOUCH "${working_dir}/sources_synced.txt")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user