summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/usermod.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/usermod.cmake b/py/usermod.cmake
index c814369a4..93fce13b3 100644
--- a/py/usermod.cmake
+++ b/py/usermod.cmake
@@ -42,6 +42,12 @@ endfunction()
# Include CMake files for user modules.
if (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}")
include(${USER_C_MODULE_PATH})
endforeach()