Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.0
Description
When building a qml example using Xcode, there are multiple messages like the following:
note: Run script build phase 'Generate CMakeFiles/coffeemachine_qmlimportscan' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'coffeemachine_qmlimportscan' from project 'coffee') note: Run script build phase 'Generate CMakeFiles/coffeemachine_automoc_json_extraction' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked.
These confuse you to hink that import scanning and json extraction will always be rerun, even in a null re-build after everything is built.
That's not really the case though.
While the custom target's command will technically be rerun it will do nothing.
We don't define any custom target commands, but rather use the custom target to drive a custom command with depfiles.
CMake currently doesn't have a way to tell Xcode that the custom target should not be rerun, that it's fully dependency based.
Upstream cmake issue https://gitlab.kitware.com/cmake/cmake/-/issues/26419#note_1588309