CMakeLists.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. add_compile_options(-D_GLIBCXX_DEBUG)
  9. # -- Output tests in directory
  10. add_executable("test_near_field"
  11. test_near_field.cc)
  12. target_link_libraries("test_near_field" ${LIBS})
  13. add_test(NAME "test_near_field"
  14. COMMAND "test_near_field")
  15. add_executable("test_near_field_multi_precision"
  16. test_near_field.cc)
  17. target_compile_options("test_near_field_multi_precision"
  18. PRIVATE -DMULTI_PRECISION=100)
  19. target_link_libraries("test_near_field_multi_precision" ${LIBS})
  20. add_test(NAME "test_near_field_multi_precision"
  21. COMMAND "test_near_field_multi_precision")
  22. # In included file test_spec_functions_data.hpp there are results of multiple
  23. # precision computation that may overflow double precision at compile time.
  24. set_source_files_properties(test_Riccati_Bessel_logarithmic_derivative.cc
  25. PROPERTIES COMPILE_FLAGS -Wno-overflow)
  26. add_executable("test_Riccati_Bessel_logarithmic_derivative"
  27. test_Riccati_Bessel_logarithmic_derivative.cc)
  28. target_link_libraries("test_Riccati_Bessel_logarithmic_derivative" ${LIBS})
  29. add_test(NAME "test_Riccati_Bessel_logarithmic_derivative"
  30. COMMAND "test_Riccati_Bessel_logarithmic_derivative")
  31. add_executable("test_bulk_sphere" test_bulk_sphere.cc)
  32. target_link_libraries("test_bulk_sphere" ${LIBS})
  33. add_test(NAME "test_bulk_sphere"
  34. COMMAND "test_bulk_sphere")
  35. add_executable("test_bulk_sphere_multi_precision" test_bulk_sphere.cc)
  36. target_compile_options("test_bulk_sphere_multi_precision"
  37. PRIVATE -DMULTI_PRECISION=100)
  38. target_link_libraries("test_bulk_sphere_multi_precision" ${LIBS})
  39. add_test(NAME "test_bulk_sphere_multi_precision"
  40. COMMAND "test_bulk_sphere_multi_precision")