Warn when a consumer ignores the precompiled header

This commit is contained in:
J. Nick Koston
2026-08-25 15:37:15 -05:00
parent 273e5f22db
commit 1b325a66ce
+1
View File
@@ -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}>"
)