py/usermod.cmake: Add check that any specified USER_C_MODULES exists.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
This commit is contained in:
committed by
Damien George
parent
b65e89107c
commit
dccd206f4c
@@ -42,6 +42,12 @@ endfunction()
|
|||||||
# Include CMake files for user modules.
|
# Include CMake files for user modules.
|
||||||
if (USER_C_MODULES)
|
if (USER_C_MODULES)
|
||||||
foreach(USER_C_MODULE_PATH ${USER_C_MODULES})
|
foreach(USER_C_MODULE_PATH ${USER_C_MODULES})
|
||||||
|
# Confirm the provided path exists, show abspath if not to make it clearer to fix.
|
||||||
|
if (NOT EXISTS ${USER_C_MODULE_PATH})
|
||||||
|
get_filename_component(USER_C_MODULES_ABS "${USER_C_MODULE_PATH}" ABSOLUTE)
|
||||||
|
message(FATAL_ERROR "USER_C_MODULES doesn't exist: ${USER_C_MODULES_ABS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
message("Including User C Module(s) from ${USER_C_MODULE_PATH}")
|
message("Including User C Module(s) from ${USER_C_MODULE_PATH}")
|
||||||
include(${USER_C_MODULE_PATH})
|
include(${USER_C_MODULE_PATH})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user