mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
cmake: add spaces2list for COMPONENT_SRCS
According to ESP-IDF Cmake build system document, COMPONENT_SRCS should support using spaces to sperate source files. Closes https://github.com/espressif/esp-idf/issues/3130
This commit is contained in:
parent
ea0a1c3030
commit
9297b07a97
@ -120,6 +120,14 @@ function run_tests()
|
|||||||
version+=$(git describe --always --tags --dirty)
|
version+=$(git describe --always --tags --dirty)
|
||||||
grep "${version}" log.log || failure "Project version should have a hash commit"
|
grep "${version}" log.log || failure "Project version should have a hash commit"
|
||||||
|
|
||||||
|
print_status "Can set COMPONENT_SRCS with spaces"
|
||||||
|
clean_build_dir
|
||||||
|
touch main/main2.c
|
||||||
|
sed -i 's/^set(COMPONENT_SRCS.*/set(COMPONENT_SRCS "main.c main2.c")/' main/CMakeLists.txt
|
||||||
|
idf.py build || failure "Set COMPONENT_SRCS with spaces build failed"
|
||||||
|
git checkout -- main/CMakeLists.txt
|
||||||
|
rm main/main2.c
|
||||||
|
|
||||||
print_status "Moving BUILD_DIR_BASE out of tree"
|
print_status "Moving BUILD_DIR_BASE out of tree"
|
||||||
clean_build_dir
|
clean_build_dir
|
||||||
OUTOFTREE_BUILD=${TESTDIR}/alt_build
|
OUTOFTREE_BUILD=${TESTDIR}/alt_build
|
||||||
|
@ -17,6 +17,7 @@ endfunction()
|
|||||||
function(register_component)
|
function(register_component)
|
||||||
get_filename_component(component_dir ${CMAKE_CURRENT_LIST_FILE} DIRECTORY)
|
get_filename_component(component_dir ${CMAKE_CURRENT_LIST_FILE} DIRECTORY)
|
||||||
|
|
||||||
|
spaces2list(COMPONENT_SRCS)
|
||||||
spaces2list(COMPONENT_SRCDIRS)
|
spaces2list(COMPONENT_SRCDIRS)
|
||||||
spaces2list(COMPONENT_ADD_INCLUDEDIRS)
|
spaces2list(COMPONENT_ADD_INCLUDEDIRS)
|
||||||
spaces2list(COMPONENT_SRCEXCLUDE)
|
spaces2list(COMPONENT_SRCEXCLUDE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user