Skip to content

Commit 5d473dc

Browse files
tejlmandMaureenHelm
authored andcommitted
cmake: fix zephyr_get_system_include_directories_for_lang() function
This commit fixes the zephyr_get_system_include_directories_for_lang() function in the event that no system include directories are specified for Zephyr interface. This fixes an issue where the value returned by this function is `-isystem` with no directory. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 5576432 commit 5d473dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/extensions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function(zephyr_get_system_include_directories_for_lang lang i)
217217

218218
process_flags(${lang} flags output_list)
219219
string(REPLACE ";" "$<SEMICOLON>" genexp_output_list "${output_list}")
220-
set(result_output_list "-isystem$<JOIN:${genexp_output_list}, -isystem>")
220+
set(result_output_list "$<$<BOOL:${genexp_output_list}>:-isystem$<JOIN:${genexp_output_list}, -isystem>>")
221221

222222
set(${i} ${result_output_list} PARENT_SCOPE)
223223
endfunction()

0 commit comments

Comments
 (0)