CMakeLists.txt 728 B

123456789101112131415161718192021222324252627282930313233
  1. cmake_minimum_required(VERSION 3.20)
  2. project(lumacs_tests)
  3. # Set C++ standard
  4. set(CMAKE_CXX_STANDARD 20)
  5. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  6. # Add includes
  7. include_directories(${CMAKE_SOURCE_DIR}/include)
  8. # Google Test targets are now globally available from the root CMakeLists.txt
  9. # No need for find_package(GTest) here.
  10. # Build tests executable
  11. add_executable(test_runner
  12. test_buffer.cpp
  13. test_editor_core.cpp
  14. test_input_pipeline.cpp
  15. test_buffer_manager.cpp
  16. test_window.cpp
  17. test_defaults_loading.cpp
  18. )
  19. target_link_libraries(test_runner PRIVATE
  20. lumacs_core
  21. gtest
  22. gtest_main
  23. pthread
  24. )
  25. # Automatically discover and register tests
  26. include(GoogleTest)
  27. gtest_discover_tests(test_runner)