From 1b325a66ce8d72176d14701d46a844aecbbd57ad Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 25 Aug 2026 15:37:15 -0500 Subject: [PATCH] Warn when a consumer ignores the precompiled header --- esphome/build_gen/espidf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/build_gen/espidf.py b/esphome/build_gen/espidf.py index b8f5e95db5..f461e0353d 100644 --- a/esphome/build_gen/espidf.py +++ b/esphome/build_gen/espidf.py @@ -337,6 +337,7 @@ def _pch_cmake() -> str: # a .gch drop out of the TU depfiles, and prepare_pch() touches the # header whenever it rebuilds the .gch so consumers recompile. target_compile_options(${{COMPONENT_LIB}} PRIVATE + "$<$:-Winvalid-pch>" "$<$:-include>" "$<$:{PCH_HEADER_NAME}>" )