mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/idfpygenerator_v4.1' into 'release/v4.1'
tools: fix idf.py to be able to select a generator for build (v4.1) See merge request espressif/esp-idf!7917
This commit is contained in:
@ -234,6 +234,19 @@ function run_tests()
|
|||||||
(cd build && cmake -G "Unix Makefiles" .. && make) || failure "Make build failed"
|
(cd build && cmake -G "Unix Makefiles" .. && make) || failure "Make build failed"
|
||||||
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||||
|
|
||||||
|
print_status "idf.py can build with Ninja"
|
||||||
|
clean_build_dir
|
||||||
|
idf.py -G Ninja build || failure "idf.py cannot build with Ninja"
|
||||||
|
grep "CMAKE_GENERATOR:INTERNAL=Ninja" build/CMakeCache.txt || failure "Ninja is not set in CMakeCache.txt"
|
||||||
|
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||||
|
|
||||||
|
print_status "idf.py can build with Unix Makefiles"
|
||||||
|
clean_build_dir
|
||||||
|
mkdir build
|
||||||
|
idf.py -G "Unix Makefiles" build || failure "idf.py cannot build with Unix Makefiles"
|
||||||
|
grep "CMAKE_GENERATOR:INTERNAL=Unix Makefiles" build/CMakeCache.txt || failure "Unix Makefiles are not set in CMakeCache.txt"
|
||||||
|
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||||
|
|
||||||
print_status "Can build with IDF_PATH set via cmake cache not environment"
|
print_status "Can build with IDF_PATH set via cmake cache not environment"
|
||||||
clean_build_dir
|
clean_build_dir
|
||||||
${SED} -i.bak 's/ENV{IDF_PATH}/{IDF_PATH}/' CMakeLists.txt
|
${SED} -i.bak 's/ENV{IDF_PATH}/{IDF_PATH}/' CMakeLists.txt
|
||||||
|
@ -193,6 +193,9 @@ def ensure_build_directory(args, prog_name, always_run_cmake=False):
|
|||||||
os.remove(cache_path)
|
os.remove(cache_path)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
# need to update cache so subsequent access in this method would reflect the result of the previous cmake run
|
||||||
|
cache = _parse_cmakecache(cache_path) if os.path.exists(cache_path) else {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
generator = cache["CMAKE_GENERATOR"]
|
generator = cache["CMAKE_GENERATOR"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Reference in New Issue
Block a user