mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
Warn when a consumer ignores the precompiled header
This commit is contained in:
@@ -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
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:-Winvalid-pch>"
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:-include>"
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:{PCH_HEADER_NAME}>"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user