title: Building Documentation for Nested projects with CMake
body: <p>I'm working on a project that contains other projects as libraries using git
  submodules. These sub-projects are under active development as well, so the root
  cmake file will run the sub-project cmake files as well.</p>
  
  <p>Example Project Structure:</p>
  
  <pre><code>current_project/
      src/
      include/
      docs/
      libs/
          sub_module_1/
              src/
              include/
              docs/
          sub_module_2/
              src/
              include/
              docs/
          sub_module_3/
              src/
              include/
              docs/
      src/
  </code></pre>
  
  <p>The actual building portion works fine. In some of the sub projects, the custom target <code>docs</code> is used to
  generate the documentation. Since there are multiple <code>docs</code> targets defined for each
  subproject, cmake complains. I don't have control over the sub-projects, and
  therefore cannot simply edit the cmake files for those. Is there a way to, without
  editing the sub-projects (as the changes will be overwritten when I do a git
  update), either have cmake combine all the commands for each sub-project and run all
  of them, or have it generate a prefix (probably the project name) for the docs
  target for each project?</p>
  
  <p>Edit: I see that CMake has projects as a defined term. I'm not referring to cmake projects. When I am saying project, I am referring to libraries and programs that, while related, are independent of each other.</p>