title: CMake add_executable in another directory
body: <p>I am making a bunch of tests in order to verify that each library are correctly linked, and then some tests for the functionalities of my code.</p>
  
  <p>I would like to have X different executable in the directory project/build/tests
  and I want my program to be build in project/build</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.0)
  project(ProjectName)
  # Linking library ...
  add_executable(${PROJECT_NAME} ${SRC_LIST} ${INCLUDE_LIST})
  </code></pre>
  
  <p>until here, everything is fine and works as wanted but then I don't know how to tell cmake to create my tests in another directory as this does not work</p>
  
  <pre><code>add_executable(tests/OpenMP_Check tests/openmp.cpp)
  </code></pre>
  
  <p>my project has this architecture : </p>
  
  <p>project : </p>
  
  <ul>
  <li>src</li>
  <li>include</li>
  <li>lib</li>
  <li>build</li>
  <li><ul>
  <li>tests</li>
  </ul></li>
  <li>tests</li>
  </ul>
  
  <p>To put it in a nutshell : How do I ask CMake to create my tests in another directory ?</p>