automoc by itself can only detect metadata files referenced by direct
usage of the Q_PLUGIN_METADATA macro. It does not do any C++ preprocessor
evaluation. Instead it needs to be helped with regexp-based filter rules for
detecting any names of files used as additional moc input.
See docs for AUTOMOC_DEPEND_FILTERS for further details.
Details
- Reviewers
apol kfunk - Group Reviewers
KDevelop - Commits
- R32:d4378dc31b95: Help automoc to find metadata JSON files referenced in the code
Changing a JSON file and running make results in the related *.moc file being
regenerated and the related object file being recompiled.
qtplugininfo shows that the created plugin binary has up-to-date JSON content.
Diff Detail
- Repository
- R32 KDevelop
- Branch
- useCMAKE_AUTOMOC_DEPEND_FILTERS
- Lint
No Linters Available - Unit
No Unit Test Coverage
Based on reply https://gitlab.kitware.com/cmake/cmake/issues/17750#note_377396 on the given filed CMake issue.
While there are three questions added by me for now on the issue, by what I tested this patch seems to {do the] right thing. I just asked to get confirmation, as the documentation left me unsure.
I started to write some comment. but then felt I duplicate the cmake docs about CMAKE_AUTOMOC_DEPEND_FILTERS.
To your yet innocent eyes, what would you think a future reader might want to know with that code directly?
I started to write some comment. but then felt I duplicate the cmake docs about CMAKE_AUTOMOC_DEPEND_FILTERS.
To your yet innocent eyes, what would you think a future reader might want to know with that code directly?
https://cmake.org/cmake/help/v3.10/variable/CMAKE_AUTOMOC_DEPEND_FILTERS.html
Why's there a regular expression? what's trying to catch?
Ah, I was looking at https://cmake.org/cmake/help/v3.10/prop_tgt/AUTOMOC_DEPEND_FILTERS.html#prop_tgt:AUTOMOC_DEPEND_FILTERS which has way more details. Okay, will extract answers to your questions and add as comments.