diff --git a/cmake/compiler/clang/target.cmake b/cmake/compiler/clang/target.cmake index 945fbce6dc3b9d..c8488fc3ca7648 100644 --- a/cmake/compiler/clang/target.cmake +++ b/cmake/compiler/clang/target.cmake @@ -44,7 +44,7 @@ if(NOT "${ARCH}" STREQUAL "posix") endforeach() foreach(isystem_include_dir ${NOSTDINC}) - list(APPEND isystem_include_flags -isystem ${isystem_include_dir}) + list(APPEND isystem_include_flags -isystem "\"${isystem_include_dir}\"") endforeach() if(CONFIG_X86) diff --git a/cmake/compiler/icx/target.cmake b/cmake/compiler/icx/target.cmake index 9b0b5567717f0b..028d9a21e8fb85 100644 --- a/cmake/compiler/icx/target.cmake +++ b/cmake/compiler/icx/target.cmake @@ -36,7 +36,7 @@ foreach(file_name include/stddef.h) endforeach() foreach(isystem_include_dir ${NOSTDINC}) - list(APPEND isystem_include_flags -isystem ${isystem_include_dir}) + list(APPEND isystem_include_flags -isystem "\"${isystem_include_dir}\"") endforeach() if(CONFIG_64BIT)