project(Persistent_cohomology_benchmark)
  
if(GMP_FOUND)
   if(GMPXX_FOUND)
     if (TARGET Boost::program_options)
       add_executable ( performance_rips_persistence EXCLUDE_FROM_ALL performance_rips_persistence.cpp )
       target_link_libraries(performance_rips_persistence Boost::program_options ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
       if(TARGET TBB::tbb)
         target_link_libraries(performance_rips_persistence TBB::tbb)
       endif()
       file(COPY "${CMAKE_SOURCE_DIR}/data/points/Kl.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
     endif()
   endif(GMPXX_FOUND)
endif(GMP_FOUND)

add_executable ( line line.cpp )
if(TARGET TBB::tbb)
  target_link_libraries(line TBB::tbb)
endif()
add_test(NAME Compare_pers_on_line COMMAND $<TARGET_FILE:line> 1000 10)

add_executable(persistence_2d persistence_2d.cpp)
if (TBB_FOUND)
  target_link_libraries(persistence_2d TBB::tbb)
endif()
add_test(NAME Compare_persistence_2d COMMAND $<TARGET_FILE:persistence_2d>)
