Improve build logging.

This commit is contained in:
Marcel Pi 2024-03-13 15:38:31 +01:00
parent 4c4d8067e9
commit 3f85bde1ab
5 changed files with 16 additions and 11 deletions

View File

@ -14,7 +14,7 @@ set (CARLA_DEPENDENCIES_PENDING)
macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
if (PREFER_CLONE)
message ("Cloning ${NAME}...")
carla_message ("Cloning ${NAME}...")
FetchContent_Declare(
${NAME}
GIT_REPOSITORY ${GIT_URL}
@ -27,7 +27,7 @@ macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
)
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
else ()
message ("Downloading ${NAME}...")
carla_message ("Downloading ${NAME}...")
FetchContent_Declare(
${NAME}
URL ${ARCHIVE_URL}

View File

@ -20,9 +20,7 @@ if ("${UE_ROOT}" STREQUAL "")
endif ()
if (NOT EXISTS ${UE_ROOT})
message (
FATAL_ERROR
"The specified Carla Unreal Engine 5 path does not exist (\"${UE_ROOT}\").")
carla_error ("The specified Carla Unreal Engine 5 path does not exist (\"${UE_ROOT}\").")
endif ()
set (ARCH ${CMAKE_HOST_SYSTEM_PROCESSOR})

View File

@ -28,7 +28,7 @@ carla_string_option (
"${CARLA_UNREAL_ENGINE_PATH_INFERRED}"
)
message (
carla_message (
"Using \"${CARLA_UNREAL_ENGINE_PATH}\" as Unreal Engine root path."
)
@ -57,11 +57,10 @@ carla_string_option (
)
if (${BUILD_CARLA_UNREAL} AND ${CARLA_HAS_UNREAL_ENGINE_PATH})
message (
carla_message (
"Carla UE project successfully added to build. (UE path: ${CARLA_UNREAL_ENGINE_PATH})")
else ()
message (
FATAL_ERROR
carla_error (
"Could not add UE project to build since the option CARLA_UNREAL_ENGINE_PATH"
"is not set to a valid path (\"${CARLA_UNREAL_ENGINE_PATH}\")."
"Please set it to point to the root path of your CARLA Unreal Engine installation."

View File

@ -59,6 +59,14 @@ set (
${CARLA_WORKSPACE_PATH}/Unreal/CarlaUnreal/Plugins
)
macro (carla_message)
message (STATUS "CARLA: " ${ARGN})
endmacro ()
macro (carla_error)
message (FATAL_ERROR ${ARGN})
endmacro ()
include (CheckCCompilerFlag)
include (CheckCXXCompilerFlag)
include (CheckLinkerFlag)
@ -80,7 +88,7 @@ endif ()
# Similar to configure_file, but also expands variables
# that are set at generate time, like generator expressions.
macro (carla_two_step_configure_file DESTINATION SOURCE)
message ("Configuring file \"${DESTINATION}\"")
carla_message ("Configuring file \"${DESTINATION}\"")
# Configure-time step; evaluate variables:
configure_file (${SOURCE} ${DESTINATION})
# Generate-time step; evaluate generator expressions:

View File

@ -173,7 +173,7 @@ elseif (APPLE)
set (EXE_EXT)
set (UE_SYSTEM_NAME Mac)
else ()
message (FATAL_ERROR "Unknown target system.")
carla_error ("Unknown target system.")
endif ()
set (