CMakeLists.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. cmake_minimum_required(VERSION 3.15)
  2. project(scattnlay_tests C CXX)
  3. # -- Dependency (Google Test)
  4. find_package(GTest REQUIRED)
  5. include_directories(${GTEST_INCLUDE_DIRS})
  6. set(LIBS ${LIBS} ${GTEST_LIBRARIES})
  7. set(LIBS ${LIBS} pthread)
  8. # -- Output tests in directory
  9. add_executable("test_near_field"
  10. test_near_field.cc)
  11. target_link_libraries("test_near_field" ${LIBS})
  12. add_test(NAME "test_near_field"
  13. COMMAND "test_near_field")
  14. # In included file test_spec_functions_data.hpp there are results of multiple
  15. # precision computation that may overflow double precision at compile time.
  16. set_source_files_properties(test_Riccati_Bessel_logarithmic_derivative.cc
  17. PROPERTIES COMPILE_FLAGS -Wno-overflow)
  18. add_executable("test_Riccati_Bessel_logarithmic_derivative"
  19. test_Riccati_Bessel_logarithmic_derivative.cc)
  20. target_link_libraries("test_Riccati_Bessel_logarithmic_derivative" ${LIBS})
  21. add_test(NAME "test_Riccati_Bessel_logarithmic_derivative"
  22. COMMAND "test_Riccati_Bessel_logarithmic_derivative")
  23. add_executable("test_bulk_sphere" test_bulk_sphere.cc)
  24. target_link_libraries("test_bulk_sphere" ${LIBS})
  25. add_test(NAME "test_bulk_sphere"
  26. COMMAND "test_bulk_sphere")
  27. add_executable("test_bulk_sphere_multi_precision" test_bulk_sphere.cc)
  28. target_compile_options("test_bulk_sphere_multi_precision"
  29. PRIVATE -DMULTI_PRECISION=100)
  30. target_link_libraries("test_bulk_sphere_multi_precision" ${LIBS})
  31. add_test(NAME "test_bulk_sphere_multi_precision"
  32. COMMAND "test_bulk_sphere_multi_precision")