Skip to content

Commit ce9763f

Browse files
committed
py/usermod.cmake: Add check that any specified USER_C_MODULES exists.
Signed-off-by: Andrew Leech <[email protected]>
1 parent 590c061 commit ce9763f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

py/usermod.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ endfunction()
4242
# Include CMake files for user modules.
4343
if (USER_C_MODULES)
4444
foreach(USER_C_MODULE_PATH ${USER_C_MODULES})
45+
if (NOT EXISTS ${USER_C_MODULE_PATH})
46+
get_filename_component(USER_C_MODULES_ABS "${USER_C_MODULE_PATH}" ABSOLUTE)
47+
message(FATAL_ERROR "USER_C_MODULES doesn't exist: ${USER_C_MODULES_ABS}")
48+
endif()
49+
4550
message("Including User C Module(s) from ${USER_C_MODULE_PATH}")
4651
include(${USER_C_MODULE_PATH})
4752
endforeach()

0 commit comments

Comments
 (0)