Clarify REUSE_FROM behavior of target_precompile_headers()
I'm updating the docs for PCH, as discussed in #19953 (comment 652323). In cleaning up the wording while I'm there, I noticed that if you use the second signature of target_precompile_headers()
which has the REUSE_FROM
keyword, the result of calling that sets not just the target's PRECOMPILE_HEADERS_REUSE_FROM
property, it also sets its PRECOMPILE_HEADERS
property. Was that intended? I only noticed because if I tried to invoke the REUSE_FROM
form on the same target twice, the warning I get is the following:
PRECOMPILE_HEADERS property is already set on target ("myapp")
I was expecting only PRECOMPILE_HEADERS_REUSE_FROM
to be set as a result of the call, but this error talks about PRECOMPILE_HEADERS
instead. Some quick checking confirmed that PRECOMPILE_HEADERS
is indeed populated by the call. @cristianadam Can you clarify the intended behavior of this? I'll then incorporate that into my doc updates.