Skip to content

Commit

Permalink
Improve messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
spahrenk committed Jul 2, 2024
1 parent 8c6a9a7 commit 5835705
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmake/initialize-submodules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# 2 - alternate reference name
macro(add_submodule module_name)

message(STATUS "Attempting to add \"${module_name}\"")
message(STATUS "Attempting to add \"${module_name}\" to project \"${PROJECT_NAME}\"")
#check of specific path is provided
set(MacroArgs ${ARGN})
list(LENGTH MacroArgs NumArgs)
Expand Down Expand Up @@ -39,7 +39,7 @@ macro(add_submodule module_name)
if (NOT is_submodule)
string(COMPARE EQUAL ${line} "[submodule \"${module_ref_name}\"]" is_submodule)
if (is_submodule)
message(STATUS "\"${module_name}\" is a submodule of this project.")
message(STATUS "\"${module_name}\" is a submodule of project \"${PROJECT_NAME}\"")
continue()
endif()
endif()
Expand All @@ -63,13 +63,13 @@ macro(add_submodule module_name)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(GIT_SUBMOD_RESULT EQUAL "0")
message(STATUS "Successfully updated submodule \"${module_name}\"")
message(STATUS "Successfully updated submodule \"${module_name}\" at ${submodule_path}")
else()
message(FATAL_ERROR "Unable to update submodule \"${module_name}\"")
message(FATAL_ERROR "Unable to update submodule \"${module_name}\" at ${submodule_path}")
endif()
endif()
else()
message(STATUS "\"${module_name}\" is not a submodule of this project")
message(STATUS "\"${module_name}\" is not a submodule of project \"${PROJECT_NAME}\"")
endif()

endif()
Expand All @@ -79,7 +79,7 @@ macro(add_submodule module_name)
message(STATUS "Submodule \"${module_name}\" is a target.")
else()
if(EXISTS "${module_path}")
message(STATUS "Adding subdirectory ${module_path} to this project")
message(STATUS "Adding subdirectory ${module_path} to project \"${PROJECT_NAME}\"")
add_subdirectory(${module_path})
endif()
endif()
Expand Down

0 comments on commit 5835705

Please sign in to comment.