diff options
author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2024-10-16 13:12:19 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-11-20 17:34:41 +1100 |
commit | dccd206f4cbbf7c15e1a5721ec5ab830d92ffa8e (patch) | |
tree | f7ed5ffdd4b8fd7aa456b1b0c286186aa3bb4988 /py | |
parent | b65e89107c0194bfdaf92720786341a2047f36b6 (diff) | |
download | micropython-dccd206f4cbbf7c15e1a5721ec5ab830d92ffa8e.tar.gz micropython-dccd206f4cbbf7c15e1a5721ec5ab830d92ffa8e.zip |
py/usermod.cmake: Add check that any specified USER_C_MODULES exists.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Diffstat (limited to 'py')
-rw-r--r-- | py/usermod.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/usermod.cmake b/py/usermod.cmake index c814369a48..93fce13b30 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() |