title: ctest run only existing tests
body: <p>I have some tests in my build that are optional. My CMakeLists.txt looks approximately like:</p>
  
  <pre><code>add_custom_target(all-tests)
  
  add_executable(A ...)
  add_dependencies(all-tests A)
  add_test(NAME A COMMAND ...)
  
  add_executable(B ...)
  add_dependencies(all-tests B)
  add_test(NAME B COMMAND ...)
  
  ## optional
  add_executable(C EXCLUDE_FROM_ALL ...)
  add_test(NAME C COMMAND ...)
  </code></pre>
  
  <p>The idea being that I can run</p>
  
  <pre><code>$ make all-tests
  $ ctest
  </code></pre>
  
  <p>To both compile all my unit tests and then run them. The problem is, since <code>C</code> is optional, it doesn't build (all desired). And since it didn't build, it doesn't exist, and gets reported as having failed:</p>
  
  <pre><code>The following tests FAILED:
        6 - C (Not Run)
  Errors while running CTest
  </code></pre>
  
  <p>Is there a way to ignore this failure / have CTest not try to run tests that don't exist / otherwise express the idea of an optional test? I have a class of these optional tests that have similar names, so it'd be nice to be able to use <code>ctest -R</code> to run them, if they are built, rather than having to configure some script or other approach. </p>