project (LORM_test)

# test sources
file (GLOB LORM_test_src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
# optionally tests for NFFT support
if( NOT ENABLE_NFFT_SUPPORT )
  list(REMOVE_ITEM LORM_test_src 
    test_nfsft.cpp test_nfsoft.cpp test_nfft2d.cpp
    test_polynomialT2Vectorized.cpp
    test_polynomialS2Vectorized.cpp
    test_polynomialSO3Vectorized.cpp
    test_quadratureT2.cpp
    test_quadratureS2.cpp
    test_quadratureS2R.cpp
    test_quadratureSO3.cpp 
    test_quadratureSO3R.cpp
    test_ditherT2.cpp 
    test_globalMinT2.cpp )
endif()

# generate test binaries
foreach (test_src ${LORM_test_src})
  string(REGEX REPLACE ".cpp" "" test_bin "${test_src}")
  add_executable (${test_bin} ${test_src})
  target_link_libraries (${test_bin} lorm ${NFFT3_LIB})
endforeach (test_src ${LORM_test_src})
