title: How to add dependency in cmake targets
body: <p>I have defined a custom target in cmake. I now want to ensure that this target is only build when the cmake target <code>test</code> was executed. How can I achieve this.</p>
  
  <p>Lets say that I have a target <code>make coverage</code> which should depend on the target <code>make test</code> to be called before, or call <code>make test</code> before executing.</p>
  
  <p>How can I define this behavior in cmake?</p>
  
  <p>Here my code that did not work as expected. I want to achive that make coverage depend that make test has to be called before.</p>
  
  <pre><code>    ADD_CUSTOM_TARGET(
          coverage COMMAND /bin/bash ${LIBPIPE_BINARY_DIR}/cmake/scripts/coverage.sh
          DEPENDS test
      )  
  </code></pre>