summaryrefslogtreecommitdiff
path: root/src/Rips_complex/example/CMakeLists.txt
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-20 15:33:53 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-01-20 15:33:53 +0000
commit3f451b963739a595d990be5517d386259ddb487f (patch)
tree4e6b8ccbf21c28c103effd9342f75907c89cf42a /src/Rips_complex/example/CMakeLists.txt
parentad6a64ad5a4f4121410250021eda0904eb9c718c (diff)
parentcbf1a50068a2c5dea6d732d40dfc66d34460d863 (diff)
Merge last trunk modifications in qt5 branch
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/qt5@1976 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7f8c5b9443bf0996347fe459fe21c42a2fed0cca
Diffstat (limited to 'src/Rips_complex/example/CMakeLists.txt')
-rw-r--r--src/Rips_complex/example/CMakeLists.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/Rips_complex/example/CMakeLists.txt b/src/Rips_complex/example/CMakeLists.txt
new file mode 100644
index 00000000..070ac710
--- /dev/null
+++ b/src/Rips_complex/example/CMakeLists.txt
@@ -0,0 +1,47 @@
+cmake_minimum_required(VERSION 2.6)
+project(Rips_complex_examples)
+
+# Point cloud
+add_executable ( ripsoffreader example_rips_complex_from_off_file.cpp )
+target_link_libraries(ripsoffreader ${Boost_SYSTEM_LIBRARY})
+
+add_executable ( oneskeletonripspoints example_one_skeleton_rips_from_points.cpp )
+target_link_libraries(oneskeletonripspoints ${Boost_SYSTEM_LIBRARY})
+
+# Distance matrix
+add_executable ( oneskeletonripsdistance example_one_skeleton_rips_from_distance_matrix.cpp )
+target_link_libraries(oneskeletonripsdistance ${Boost_SYSTEM_LIBRARY})
+
+add_executable ( ripscsvdistancereader example_rips_complex_from_csv_distance_matrix_file.cpp )
+target_link_libraries(ripscsvdistancereader ${Boost_SYSTEM_LIBRARY})
+
+if (TBB_FOUND)
+ target_link_libraries(ripsoffreader ${TBB_LIBRARIES})
+ target_link_libraries(oneskeletonripspoints ${TBB_LIBRARIES})
+ target_link_libraries(oneskeletonripsdistance ${TBB_LIBRARIES})
+ target_link_libraries(ripscsvdistancereader ${TBB_LIBRARIES})
+endif()
+
+add_test(oneskeletonripspoints ${CMAKE_CURRENT_BINARY_DIR}/oneskeletonripspoints)
+add_test(oneskeletonripsdistance ${CMAKE_CURRENT_BINARY_DIR}/oneskeletonripsdistance)
+
+# Do not forget to copy test files in current binary dir
+file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+add_test(ripsoffreader_doc_12_1 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader alphacomplexdoc.off 12.0 1 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt)
+add_test(ripsoffreader_doc_12_3 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader alphacomplexdoc.off 12.0 3 ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_3.txt)
+
+file(COPY "${CMAKE_SOURCE_DIR}/data/distance_matrix/full_square_distance_matrix.csv" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+add_test(ripscsvdistancereader_doc_12_1 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvdistancereader full_square_distance_matrix.csv 12.0 1 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_1.txt)
+add_test(ripscsvdistancereader_doc_12_3 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvdistancereader full_square_distance_matrix.csv 12.0 3 ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_3.txt)
+
+
+if (DIFF_PATH)
+ # Do not forget to copy test results files in current binary dir
+ file(COPY "one_skeleton_rips_for_doc.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+ file(COPY "full_skeleton_rips_for_doc.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+
+ add_test(ripsoffreader_doc_12_1_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_1.txt ${CMAKE_CURRENT_BINARY_DIR}/one_skeleton_rips_for_doc.txt)
+ add_test(ripsoffreader_doc_12_3_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripsoffreader_result_12_3.txt ${CMAKE_CURRENT_BINARY_DIR}/full_skeleton_rips_for_doc.txt)
+ add_test(ripscsvreader_doc_12_1_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_1.txt ${CMAKE_CURRENT_BINARY_DIR}/one_skeleton_rips_for_doc.txt)
+ add_test(ripscsvreader_doc_12_3_diff_files ${DIFF_PATH} ${CMAKE_CURRENT_BINARY_DIR}/ripscsvreader_result_12_3.txt ${CMAKE_CURRENT_BINARY_DIR}/full_skeleton_rips_for_doc.txt)
+endif()