title: CMake configuration for multiple test files
body: <p>I'm running into following error. Basically I've two test .c files, how can I've them run both independently? Each one having it's own main function?</p>
  <blockquote>
  <p>duplicate symbol _main in:</p>
  <p>CMakeFiles/Tests.dir/test.c.o</p>
  <p>CMakeFiles/Tests.dir/test2.c.o</p>
  </blockquote>
  <p><strong>Root CMakeLists.txt</strong></p>
  <pre><code>cmake_minimum_required(VERSION 3.9)
  project(Polymorphism)
  
  set(CMAKE_C_STANDARD 99)
  
  add_subdirectory(src)
  add_subdirectory(test)
  </code></pre>
  <p><strong>src/CMakeLists.txt</strong></p>
  <pre><code>add_library(Polymorphism person.c employee.c)
  target_include_directories(Polymorphism PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  </code></pre>
  <p><strong>test/CMakeLists.txt</strong></p>
  <pre><code>add_executable(Tests test.c test2.c)
  target_link_libraries(Tests Polymorphism)
  </code></pre>
  <p><strong>test/test.c</strong></p>
  <pre><code>void main() {
      // some tests
  }
  </code></pre>
  <p><strong>test/test2.c</strong></p>
  <pre><code>void main() {
     // some tests
  }
  </code></pre>