diff --git a/cmake/modules/user_cache.cmake b/cmake/modules/user_cache.cmake index 1e8b59d675..ab6b2dfdac 100644 --- a/cmake/modules/user_cache.cmake +++ b/cmake/modules/user_cache.cmake @@ -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}