CMakeLists.txt 365 B

12345678910111213141516171819202122
  1. cmake_minimum_required(VERSION 3.20)
  2. find_package(Catch2 3 REQUIRED)
  3. if(CMAKE_BUILD_TYPE MATCHES Debug)
  4. add_compile_options(-Wall -Wno-unknown-pragmas -DDEBUG)
  5. endif()
  6. file(GLOB TestsSrc
  7. "./test_*.cpp"
  8. )
  9. add_executable(tests_lib ${TestsSrc})
  10. target_link_libraries(tests_lib PRIVATE Catch2::Catch2WithMain mcl::interface)
  11. add_test(RunAllTests tests_lib)