CMakeLists.txt 843 B

123456789101112131415161718192021222324252627282930313233
  1. # Tests for SmartBotic CRM
  2. # Fetch GoogleTest
  3. include(FetchContent)
  4. FetchContent_Declare(
  5. googletest
  6. GIT_REPOSITORY https://github.com/google/googletest.git
  7. GIT_TAG v1.14.0
  8. )
  9. # Prevent overriding the parent project's compiler/linker settings
  10. set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
  11. FetchContent_MakeAvailable(googletest)
  12. enable_testing()
  13. # ============================================================================
  14. # Database Tests
  15. # ============================================================================
  16. add_executable(database_tests
  17. database/snapshot_test.cpp
  18. )
  19. target_compile_options(database_tests PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  20. target_link_libraries(database_tests
  21. PRIVATE
  22. smartbotic::database
  23. GTest::gtest_main
  24. )
  25. include(GoogleTest)
  26. gtest_discover_tests(database_tests)