CMakeLists.txt 491 B

1234567891011121314151617181920
  1. find_package(GTestSrc)
  2. IF(GTESTSRC_FOUND)
  3. enable_testing()
  4. if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
  5. set(gtest_disable_pthreads ON)
  6. set(gtest_force_shared_crt ON)
  7. endif()
  8. add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
  9. include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
  10. set(TEST_LIBRARIES gtest gtest_main)
  11. add_custom_target(tests ALL)
  12. add_subdirectory(perftest)
  13. add_subdirectory(unittest)
  14. ENDIF(GTESTSRC_FOUND)