diff --git a/cmake/extensions.cmake b/cmake/extensions.cmake index 11e296d0e6..14f67face1 100644 --- a/cmake/extensions.cmake +++ b/cmake/extensions.cmake @@ -202,7 +202,7 @@ function(zephyr_get_include_directories_for_lang lang i) string(REPLACE ";" "$" genexp_output_list "${output_list}") if(NOT ARGN) - set(result_output_list "-I$") + set(result_output_list "-I$-I>") elseif(args_STRIP_PREFIX) # The list has no prefix, so don't add it. set(result_output_list ${output_list}) @@ -217,7 +217,7 @@ function(zephyr_get_system_include_directories_for_lang lang i) process_flags(${lang} flags output_list) string(REPLACE ";" "$" genexp_output_list "${output_list}") - set(result_output_list "$<$:-isystem$>") + set(result_output_list "$<$:-isystem$-isystem>>") set(${i} ${result_output_list} PARENT_SCOPE) endfunction() @@ -227,7 +227,7 @@ function(zephyr_get_compile_definitions_for_lang lang i) process_flags(${lang} flags output_list) string(REPLACE ";" "$" genexp_output_list "${output_list}") - set(result_output_list "-D$") + set(result_output_list "-D$-D>") set(${i} ${result_output_list} PARENT_SCOPE) endfunction() @@ -237,7 +237,7 @@ function(zephyr_get_compile_options_for_lang lang i) process_flags(${lang} flags output_list) string(REPLACE ";" "$" genexp_output_list "${output_list}") - set(result_output_list " $") + set(result_output_list "$>") set(${i} ${result_output_list} PARENT_SCOPE) endfunction() diff --git a/cmake/linker/arcmwdt/target.cmake b/cmake/linker/arcmwdt/target.cmake index 97667a9ed9..5c2da55829 100644 --- a/cmake/linker/arcmwdt/target.cmake +++ b/cmake/linker/arcmwdt/target.cmake @@ -26,7 +26,7 @@ macro(configure_linker_script linker_script_gen linker_pass_define) set(linker_script_dep "") endif() - zephyr_get_include_directories_for_lang(C current_includes "$") + zephyr_get_include_directories_for_lang(C current_includes) get_filename_component(base_name ${CMAKE_CURRENT_BINARY_DIR} NAME) get_property(current_defines GLOBAL PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES) diff --git a/cmake/linker/ld/target.cmake b/cmake/linker/ld/target.cmake index 26e28c1b2f..5f2cdd07b2 100644 --- a/cmake/linker/ld/target.cmake +++ b/cmake/linker/ld/target.cmake @@ -26,7 +26,7 @@ macro(configure_linker_script linker_script_gen linker_pass_define) set(linker_script_dep "") endif() - zephyr_get_include_directories_for_lang(C current_includes "$") + zephyr_get_include_directories_for_lang(C current_includes) get_filename_component(base_name ${CMAKE_CURRENT_BINARY_DIR} NAME) get_property(current_defines GLOBAL PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES)