0

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?

artless noise
  • 21,212
  • 6
  • 68
  • 105
tohava
  • 5,344
  • 1
  • 25
  • 47
  • Have you tried anything? 1. `ExternalProject_Add(GCCPlugin ...)`. 2. `add_dependencies( GCCPlugin)`. 3. Automatically because of second step. – Tsyvarev Jan 17 '17 at 10:29
  • How do I cause the second step to happen automatically for all other targets? – tohava Jan 17 '17 at 10:29
  • 1
    As far as I know, there is no direct way for add one target as dependent for all-other-targets. If it is your actual problem, edit the question correspondignly. Currently your question is read as "write-code-for-me". – Tsyvarev Jan 17 '17 at 10:31

0 Answers0