py/mkrules.cmake: Improve printing of git-submodules error.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-06-30 13:49:47 +10:00
parent 797a83ac3e
commit f1b5761ced

View File

@ -182,6 +182,9 @@ endif()
# Update submodules
if(ECHO_SUBMODULES)
# If cmake is run with GIT_SUBMODULES defined on command line, process the port / board
# settings then print the final GIT_SUBMODULES variable as a fatal error and exit.
message(FATAL_ERROR "GIT_SUBMODULES=${GIT_SUBMODULES}")
# settings then print the final GIT_SUBMODULES variable and exit.
# Note: the GIT_SUBMODULES is done via echo rather than message, as message splits
# the output onto multiple lines
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "GIT_SUBMODULES=${GIT_SUBMODULES}")
message(FATAL_ERROR "Done")
endif()