Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions 50-GerritCTestConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()