Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch results are only displayed once per invocation of CMake #292

Merged
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
17 changes: 10 additions & 7 deletions rapids-cmake/cpm/detail/display_patch_status.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ Displays the result of any patches applied to the requested package

#]=======================================================================]
function(rapids_cpm_display_patch_status package_name)
list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.display_patch_status")
set(log_file "${CMAKE_BINARY_DIR}/rapids-cmake/patches/${package_name}/log")
if(EXISTS "${log_file}")
file(STRINGS "${log_file}" contents)
foreach(line IN LISTS contents)
message(STATUS "${line}")
endforeach()
# Only display the status information on the first execution of the call
if(${package_name}_ADDED)
list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.display_patch_status")
set(log_file "${CMAKE_BINARY_DIR}/rapids-cmake/patches/${package_name}/log")
if(EXISTS "${log_file}")
file(STRINGS "${log_file}" contents)
foreach(line IN LISTS contents)
message(STATUS "${line}")
endforeach()
endif()
endif()
endfunction()