kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/idf_build_process_default' into 'master'
cmake: fix issue with setting defaults in idf_build_process Closes IDFGH-3027 See merge request espressif/esp-idf!8537pull/5408/head
commit
88d76d805a
|
@ -730,6 +730,19 @@ endmenu\n" >> ${IDF_PATH}/Kconfig
|
|||
test -f build/flasher_args.json && failure "flasher_args.json should not be generated in a loadable ELF build"
|
||||
idf.py build || failure "Couldn't build a loadable ELF file"
|
||||
|
||||
print_status "Defaults set properly for unspecified idf_build_process args"
|
||||
pushd $IDF_PATH/examples/build_system/cmake/idf_as_lib
|
||||
cp CMakeLists.txt CMakeLists.txt.bak
|
||||
echo -e "\nidf_build_get_property(project_dir PROJECT_DIR)" >> CMakeLists.txt
|
||||
echo -e "\nmessage(\"Project directory: \${project_dir}\")" >> CMakeLists.txt
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32.cmake -DTARGET=esp32 &> log.txt
|
||||
grep "Project directory: $IDF_PATH/examples/build_system/cmake/idf_as_lib" log.txt || failure "PROJECT_DIR default was not set"
|
||||
cd ..
|
||||
mv CMakeLists.txt.bak CMakeLists.txt
|
||||
rm -rf build
|
||||
popd
|
||||
|
||||
print_status "All tests completed"
|
||||
if [ -n "${FAILURES}" ]; then
|
||||
echo "Some failures were detected:"
|
||||
|
|
|
@ -314,7 +314,7 @@ endmacro()
|
|||
#
|
||||
macro(__build_set_default var default)
|
||||
set(_var __${var})
|
||||
if(NOT "${_var}" STREQUAL "")
|
||||
if(NOT "${${_var}}" STREQUAL "")
|
||||
idf_build_set_property(${var} "${${_var}}")
|
||||
else()
|
||||
idf_build_set_property(${var} "${default}")
|
||||
|
|
Ładowanie…
Reference in New Issue