CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233
  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. # In included file test_spec_functions_data.hpp there are results of multiple
  10. # precision computation that may overflow double precision at compile time.
  11. set_source_files_properties(test_Riccati_Bessel_logarithmic_derivative.cc
  12. PROPERTIES COMPILE_FLAGS -Wno-overflow)
  13. add_executable("test_Riccati_Bessel_logarithmic_derivative"
  14. test_Riccati_Bessel_logarithmic_derivative.cc)
  15. target_link_libraries("test_Riccati_Bessel_logarithmic_derivative" ${LIBS})
  16. add_test(NAME "test_Riccati_Bessel_logarithmic_derivative"
  17. COMMAND "test_Riccati_Bessel_logarithmic_derivative")
  18. add_executable("test_bulk_sphere" test_bulk_sphere.cc)
  19. target_link_libraries("test_bulk_sphere" ${LIBS})
  20. add_test(NAME "test_bulk_sphere"
  21. COMMAND "test_bulk_sphere")
  22. add_executable("test_bulk_sphere_multi_precision" test_bulk_sphere.cc)
  23. target_compile_options("test_bulk_sphere_multi_precision"
  24. PRIVATE -DMULTI_PRECISION=100)
  25. target_link_libraries("test_bulk_sphere_multi_precision" ${LIBS})
  26. add_test(NAME "test_bulk_sphere_multi_precision"
  27. COMMAND "test_bulk_sphere_multi_precision")