title: CMake -- Add all sources in subdirectory to cmake project
body: <p>As a follow up to this question:
  <a href="https://stackoverflow.com/questions/8934295/add-source-in-a-subdirectory-to-a-cmake-project">Add Source in a subdirectory to a cmake project</a></p>
  
  <p>What is the best way (perhaps using the FILE directive?) to select <em>all</em> the .cpp and .h files in the subdirectory and add them to the SOURCE variable defined in the parent directory?</p>
  
  <hr>
  
  <p>Example from answer to question above:</p>
  
  <pre><code>set(SOURCE
    ${SOURCE}
    ${CMAKE_CURRENT_SOURCE_DIR}/file1.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/file2.cpp
    PARENT_SCOPE
  )
  
  set(HEADERS
     ${HEADERS}
     ${CMAKE_CURRENT_SOURCE_DIR}/file1.hpp
     ${CMAKE_CURRENT_SOURCE_DIR}/file2.hpp
     PARENT_SCOPE
  )
  </code></pre>
  
  <p>Is it possible to do something like this?</p>
  
  <pre><code>FILE(GLOB SUB_SOURCES *.cpp)
  set(SOURCE
    ${SOURCE}
    ${CMAKE_CURRENT_SOURCE_DIR}/${SUB_SOURCES}
    PARENT_SCOPE
  )
  </code></pre>
  
  <p>What is the best way (using CMake) to compile all the sources in a directory and a subdirectory into a single output file (not multiple libraries?)</p>