Skip to content

Commit adeca47

Browse files
committed
🔨 Fix Warnings.cpp force-recompile
1 parent 686d1fb commit adeca47

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

buildroot/share/PlatformIO/scripts/preflight-checks.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,12 @@ def sanity_check_target():
8181
#
8282
# Give warnings on every build
8383
#
84-
srcpath = os.path.join(env['PROJECT_BUILD_DIR'], build_env, "src", "src")
85-
warnfile = os.path.join(srcpath, "inc", "Warnings.cpp.o")
86-
if os.path.exists(warnfile):
87-
os.remove(warnfile)
84+
build_dir = os.path.join(env['PROJECT_BUILD_DIR'], build_env);
85+
for outdir in [ build_dir, os.path.join(build_dir, "debug") ]:
86+
for wext in [ ".cpp", "" ]:
87+
warnfile = os.path.join(outdir, "src", "src", "inc", "Warnings" + wext + ".o")
88+
if os.path.exists(warnfile):
89+
os.remove(warnfile)
8890

8991
#
9092
# Rebuild 'settings.cpp' for EEPROM_INIT_NOW

0 commit comments

Comments
 (0)