diff --git a/50-GerritCTestConfig.cmake b/50-GerritCTestConfig.cmake index 2b35a599cbe..24de8ff4c05 100644 --- a/50-GerritCTestConfig.cmake +++ b/50-GerritCTestConfig.cmake @@ -7,16 +7,17 @@ set(dashboard_no_clean 1) find_package(Git) if(GIT_EXECUTABLE) - execute_process(COMMAND ${GIT_EXECUTABLE} diff-tree --no-commit-id --name-only -r HEAD + execute_process(COMMAND ${GIT_EXECUTABLE} diff-tree --no-commit-id --name-only --diff-filter=ACMRT -r HEAD WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${dashboard_source_name}" RESULT_VARIABLE result OUTPUT_VARIABLE output) if(${result} EQUAL 0 AND "${output}" MATCHES "Modules/Remote") string(REGEX MATCHALL "Modules/Remote/.*[.]remote[.]cmake" remote_paths "${output}") + string(REGEX REPLACE "\n" ";" remote_paths ${remote_paths}) foreach(remote ${remote_paths}) string(REGEX REPLACE "Modules/Remote/(.*)[.]remote[.]cmake" "Module_\\1:BOOL=ON" module_enable "${remote}") message(STATUS "Remote module change detected. Adding: ${module_enable}") - set(dashboard_cache "${dashboard_cache} ${module_enable}") + set(dashboard_cache "${dashboard_cache}\n${module_enable}") endforeach() endif() endif()