Merge branch 'bugfix/restore_ccache_use' into 'release/v3.3'
CMake : Restore ccache use (backport v3.3) See merge request idf/esp-idf!4985
This commit is contained in:
commit
871e95087e
2 changed files with 16 additions and 0 deletions
|
@ -373,6 +373,13 @@ EOF
|
||||||
|| failure "Custom bootloader source files should be built instead of the original's"
|
|| failure "Custom bootloader source files should be built instead of the original's"
|
||||||
rm -rf components
|
rm -rf components
|
||||||
|
|
||||||
|
print_status "Check ccache is used to build when present"
|
||||||
|
touch ccache && chmod +x ccache # make sure that ccache is present for this test
|
||||||
|
(export PATH=$PWD:$PATH && idf.py reconfigure | grep "ccache will be used for faster builds") || failure "ccache should be used when present"
|
||||||
|
(export PATH=$PWD:$PATH && idf.py reconfigure --no-ccache | grep -c "ccache will be used for faster builds" | grep -wq 0) \
|
||||||
|
|| failure "ccache should not be used even when present if --no-ccache is specified"
|
||||||
|
rm -f ccache
|
||||||
|
|
||||||
print_status "All tests completed"
|
print_status "All tests completed"
|
||||||
if [ -n "${FAILURES}" ]; then
|
if [ -n "${FAILURES}" ]; then
|
||||||
echo "Some failures were detected:"
|
echo "Some failures were detected:"
|
||||||
|
|
|
@ -83,6 +83,15 @@ macro(project name)
|
||||||
# Now the configuration is loaded, set the toolchain appropriately
|
# Now the configuration is loaded, set the toolchain appropriately
|
||||||
idf_set_toolchain()
|
idf_set_toolchain()
|
||||||
|
|
||||||
|
# Enable ccache if it's on the path
|
||||||
|
if(NOT CCACHE_DISABLE)
|
||||||
|
find_program(CCACHE_FOUND ccache)
|
||||||
|
if(CCACHE_FOUND)
|
||||||
|
message(STATUS "ccache will be used for faster builds")
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
__project(${name} C CXX ASM)
|
__project(${name} C CXX ASM)
|
||||||
|
|
||||||
set(IDF_BUILD_ARTIFACTS ON)
|
set(IDF_BUILD_ARTIFACTS ON)
|
||||||
|
|
Loading…
Reference in a new issue