I want to add a gcc plugin to my cmake project. The solution should satisfy the following:
- The gcc plugin should be pulled from a git repository (I can use external project for this)
- Everything that is not the gcc plugin should automatically order-depend on the gcc plugin. This means that if the plugin is not built, it is built before anything else.
- OPTIONAL: Everything should automatically fully-depend on the gcc plugin. This means that if the plugin got updated, then it and everything else will be rebuilt.
Note that by automatically I mean that I don't have to manually add this dependency for every target.
How can I implement this with cmake?