Skip to content

Commit 960b4de

Browse files
committed
Properly detect modification of CMakeLists.txt files
1 parent 9d5cc62 commit 960b4de

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

builder/frameworks/espidf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ def get_project_lib_includes(env):
112112

113113
def is_cmake_reconfigure_required(cmake_api_reply_dir):
114114
cmake_cache_file = join(BUILD_DIR, "CMakeCache.txt")
115-
cmake_txt_file = join(env.subst("$PROJECT_DIR"), "CMakeLists.txt")
115+
cmake_txt_files = [
116+
join(env.subst("$PROJECT_DIR"), "CMakeLists.txt"),
117+
join(env.subst("$PROJECT_SRC_DIR"), "CMakeLists.txt")
118+
]
116119
cmake_preconf_dir = join(BUILD_DIR, "config")
117120
sdkconfig = join(env.subst("$PROJECT_DIR"), "sdkconfig")
118121

@@ -127,7 +130,7 @@ def is_cmake_reconfigure_required(cmake_api_reply_dir):
127130
return True
128131
if any(
129132
getmtime(f) > getmtime(cmake_cache_file)
130-
for f in (cmake_txt_file, cmake_preconf_dir)
133+
for f in cmake_txt_files + [cmake_preconf_dir]
131134
):
132135
return True
133136

@@ -996,6 +999,7 @@ def _skip_prj_source_files(node):
996999
env.MergeFlags(project_flags)
9971000
env.Prepend(
9981001
CPPPATH=app_includes["plain_includes"],
1002+
CPPDEFINES=project_defines,
9991003
LINKFLAGS=extra_flags,
10001004
LIBS=libs,
10011005
FLASH_EXTRA_IMAGES=[

0 commit comments

Comments
 (0)