mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/build_spaces_in_path_simple_fixes' into 'master'
build system: simple fixes for quoting and other minor issues See merge request espressif/esp-idf!15427
This commit is contained in:
commit
a5ba1ac395
@ -37,7 +37,7 @@ set(COMPONENTS
|
||||
# Make EXTRA_COMPONENT_DIRS variable to point to the bootloader_components directory
|
||||
# of the project being compiled
|
||||
set(PROJECT_EXTRA_COMPONENTS "${PROJECT_SOURCE_DIR}/bootloader_components")
|
||||
set(EXTRA_COMPONENT_DIRS "${PROJECT_EXTRA_COMPONENTS}" APPEND)
|
||||
list(APPEND EXTRA_COMPONENT_DIRS "${PROJECT_EXTRA_COMPONENTS}")
|
||||
|
||||
# Consider each directory in project's bootloader_components as a component to be compiled
|
||||
file(GLOB proj_components RELATIVE ${PROJECT_EXTRA_COMPONENTS} ${PROJECT_EXTRA_COMPONENTS}/*)
|
||||
|
@ -265,7 +265,7 @@ function(__build_write_properties output_file)
|
||||
idf_build_get_property(build_properties __BUILD_PROPERTIES)
|
||||
foreach(property ${build_properties})
|
||||
idf_build_get_property(val ${property})
|
||||
set(build_properties_text "${build_properties_text}\nset(${property} ${val})")
|
||||
set(build_properties_text "${build_properties_text}\nset(${property} \"${val}\")")
|
||||
endforeach()
|
||||
file(WRITE ${output_file} "${build_properties_text}")
|
||||
endfunction()
|
||||
|
@ -126,7 +126,7 @@ function(__component_write_properties output_file)
|
||||
foreach(property ${component_properties})
|
||||
__component_get_property(val ${component_target} ${property})
|
||||
set(component_properties_text
|
||||
"${component_properties_text}\nset(__component_${component_target}_${property} ${val})")
|
||||
"${component_properties_text}\nset(__component_${component_target}_${property} \"${val}\")")
|
||||
endforeach()
|
||||
file(WRITE ${output_file} "${component_properties_text}")
|
||||
endforeach()
|
||||
|
@ -121,11 +121,13 @@ function(__kconfig_bootloader_component_add component_dir)
|
||||
idf_build_get_property(bootloader_kconfigs_proj BOOTLOADER_KCONFIGS_PROJ)
|
||||
|
||||
file(GLOB kconfig "${component_dir}/Kconfig")
|
||||
list(SORT kconfig)
|
||||
if(EXISTS "${kconfig}" AND NOT IS_DIRECTORY "${kconfig}")
|
||||
list(APPEND bootloader_kconfigs "${kconfig}")
|
||||
endif()
|
||||
|
||||
file(GLOB kconfig "${component_dir}/Kconfig.projbuild")
|
||||
list(SORT kconfig)
|
||||
if(EXISTS "${kconfig}" AND NOT IS_DIRECTORY "${kconfig}")
|
||||
list(APPEND bootloader_kconfigs_proj "${kconfig}")
|
||||
endif()
|
||||
@ -163,8 +165,12 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
||||
# Take into account bootloader components configuration files
|
||||
idf_build_get_property(bootloader_kconfigs BOOTLOADER_KCONFIGS)
|
||||
idf_build_get_property(bootloader_kconfigs_proj BOOTLOADER_KCONFIGS_PROJ)
|
||||
if(bootloader_kconfigs)
|
||||
list(APPEND kconfigs "${bootloader_kconfigs}")
|
||||
endif()
|
||||
if(bootloader_kconfigs_proj)
|
||||
list(APPEND kconfig_projbuilds "${bootloader_kconfigs_proj}")
|
||||
endif()
|
||||
|
||||
# Store the list version of kconfigs and kconfig_projbuilds
|
||||
idf_build_set_property(KCONFIGS "${kconfigs}")
|
||||
|
@ -444,7 +444,7 @@ macro(project project_name)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
set(mapfile "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.map")
|
||||
target_link_libraries(${project_elf} "-Wl,--cref -Wl,--Map=${mapfile}")
|
||||
target_link_libraries(${project_elf} "-Wl,--cref" "-Wl,--Map=\"${mapfile}\"")
|
||||
endif()
|
||||
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
|
||||
|
@ -158,9 +158,9 @@ function(target_linker_script target deptype scriptfiles)
|
||||
get_target_property(link_libraries "${target}" LINK_LIBRARIES)
|
||||
endif()
|
||||
|
||||
list(FIND "${link_libraries}" "-L ${search_dir}" found_search_dir)
|
||||
list(FIND "${link_libraries}" "-L \"${search_dir}\"" found_search_dir)
|
||||
if(found_search_dir EQUAL "-1") # not already added as a search path
|
||||
target_link_libraries("${target}" "${deptype}" "-L ${search_dir}")
|
||||
target_link_libraries("${target}" "${deptype}" "-L \"${search_dir}\"")
|
||||
endif()
|
||||
|
||||
target_link_libraries("${target}" "${deptype}" "-T ${scriptname}")
|
||||
|
Loading…
Reference in New Issue
Block a user