CMakeLists.txt 859 B

123456789101112131415161718192021222324252627282930313233343536
  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_manager.cpp
  17. test_kill_ring_manager.cpp
  18. test_register_manager.cpp
  19. test_macro_manager.cpp
  20. test_rectangle_manager.cpp
  21. test_command_system.cpp
  22. test_lua_api.cpp
  23. )
  24. target_link_libraries(test_runner PRIVATE
  25. lumacs_core
  26. GTest::gtest_main
  27. )
  28. # Automatically discover and register tests
  29. include(GoogleTest)
  30. gtest_discover_tests(test_runner)