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

Print build information at the end of configuration #3052

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ file(RELATIVE_PATH relDir
set(CMAKE_INSTALL_RPATH ${base} ${base}/${relDir})

include(BuildType)
include(BuildInfo)

if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git AND NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit)
message(WARNING
Expand Down Expand Up @@ -125,3 +126,5 @@ add_custom_target(Github SOURCES
.github/workflows/package-windows-msys2.yml
.github/workflows/clang-tidy.yml
)

mrtrix_print_build_instructions()
14 changes: 14 additions & 0 deletions cmake/BuildInfo.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function(mrtrix_print_build_instructions)
set(message_list "\n")
list(APPEND message_list "MRtrix3 has been successfully configured for compilation.")
list(APPEND message_list "To build MRtrix3, run 'cmake --build .' from the build directory.")
daljit46 marked this conversation as resolved.
Show resolved Hide resolved

list(APPEND message_list "To reconfigure the project, run CMake again with the same arguments.")
list(APPEND message_list "If reconfiguration fails, remove the CMakeCache.txt file in the build "
"directory or run CMake adding the --fresh flag.")
list(APPEND message_list "\n")

# Remove ; from list and add two spaces to the beginning of each line
string(REPLACE ";" "\n " message_list "${message_list}")
message(STATUS "${message_list}")
endfunction()
Loading