cmake: Fix USER_CACHE_DIR path generation
When the optional env_suffix_${env_var} was not set, USER_CACHE_DIR was
slightly malformed and had double slashes,
e.g. /home/user/.cache//zephyr.
To fix it string(JOIN ...) is used, which only sets slashes when
necessary.
Signed-off-by: Manoel Brunnen <mb@lee-brunnen.de>
This commit is contained in:
parent
926219156b
commit
3953de793f
@ -59,7 +59,7 @@ function(find_appropriate_cache_directory dir)
|
||||
if(DEFINED ENV{${env_var}})
|
||||
set(env_dir $ENV{${env_var}})
|
||||
|
||||
set(test_user_dir ${env_dir}/${env_suffix_${env_var}})
|
||||
string(JOIN "/" test_user_dir ${env_dir} ${env_suffix_${env_var}})
|
||||
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
${ZEPHYR_BASE}/scripts/build/dir_is_writeable.py ${test_user_dir}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user