Reconfigure IDF project if dependencies changed
This commit is contained in:
@@ -405,13 +405,15 @@ def is_cmake_reconfigure_required(cmake_api_reply_dir):
|
||||
]
|
||||
cmake_preconf_dir = os.path.join(BUILD_DIR, "config")
|
||||
deafult_sdk_config = os.path.join(PROJECT_DIR, "sdkconfig.defaults")
|
||||
idf_deps_lock = os.path.join(PROJECT_DIR, "dependencies.lock")
|
||||
ninja_buildfile = os.path.join(BUILD_DIR, "build.ninja")
|
||||
|
||||
for d in (cmake_api_reply_dir, cmake_preconf_dir):
|
||||
if not os.path.isdir(d) or not os.listdir(d):
|
||||
return True
|
||||
if not os.path.isfile(cmake_cache_file):
|
||||
return True
|
||||
if not os.path.isfile(os.path.join(BUILD_DIR, "build.ninja")):
|
||||
if not os.path.isfile(ninja_buildfile):
|
||||
return True
|
||||
if not os.path.isfile(SDKCONFIG_PATH) or os.path.getmtime(
|
||||
SDKCONFIG_PATH
|
||||
@@ -421,6 +423,10 @@ def is_cmake_reconfigure_required(cmake_api_reply_dir):
|
||||
deafult_sdk_config
|
||||
) > os.path.getmtime(cmake_cache_file):
|
||||
return True
|
||||
if os.path.isfile(idf_deps_lock) and os.path.getmtime(
|
||||
idf_deps_lock
|
||||
) > os.path.getmtime(ninja_buildfile):
|
||||
return True
|
||||
if any(
|
||||
os.path.getmtime(f) > os.path.getmtime(cmake_cache_file)
|
||||
for f in cmake_txt_files + [cmake_preconf_dir, FRAMEWORK_DIR]
|
||||
|
||||
Reference in New Issue
Block a user