title: No tests found when using gtest with cmake/ctest
body: <p>I have a project with the following structure:</p>
  
  <pre><code>linalg
  ├── build
  ├── CMakeLists.txt
  ├── docs
  │   └── Doxyfile
  ├── include
  │   └── linalg
  │       └── vector3.hpp
  ├── src
  │   ├── CMakeLists.txt
  │   └── linalg
  │       └── vector3.cpp
  └── test
      ├── CMakeLists.txt
      └── linalg
          └── test_vector3.cpp
  </code></pre>
  
  <p>The file test_vector3.cpp is a gtest unit test file which provides two simple tests.  The top level CMakeLists.txt simply sets up the includes and adds the src and test subdirectories:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8)
  
  project(linalg)
  
  include_directories(include)
  add_subdirectory(src)
  add_subdirectory(test)
  </code></pre>
  
  <p>The src/CMakeLists.txt file compiles vector3.cpp into a static library:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8)
  
  add_library(linalg linalg/vector3.cpp)
  </code></pre>
  
  <p>The test/CMakeLists.txt file is based on the example provided in /usr/share/cmake-2.8/Modules/FindGTest.cmake:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8)
  
  enable_testing()
  find_package(GTest REQUIRED)
  include_directories(${GTEST_INCLUDE_DIRS})
  
  add_executable(test_vector3 linalg/test_vector3.cpp)
  target_link_libraries(test_vector3 linalg ${GTEST_BOTH_LIBRARIES} pthread)
  
  add_test(test_vector3 test_vector3)
  </code></pre>
  
  <p>I then run the following:</p>
  
  <pre><code>cd build
  cmake ..
  make
  </code></pre>
  
  <p>I get the liblinalg.a library compiled correctly in to build/src and I get the test_vector3 executable compiled correctly in to build/test.  I can run the test_vector3 executable and I get the output from googletest saying that all tests have passed, however if I run <code>make test</code> I get no output whatsoever and if I run <code>ctest ..</code> I get a message saying:</p>
  
  <pre><code>Test project /home/ryan/GitHub/linalg/build
  No tests were found!!!
  </code></pre>
  
  <p>Is there something I am missing? Or have I just misunderstood how ctest works with gtest?</p>