summaryrefslogtreecommitdiff
path: root/src/common/example/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/example/CMakeLists.txt')
-rw-r--r--src/common/example/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt
new file mode 100644
index 00000000..583a0027
--- /dev/null
+++ b/src/common/example/CMakeLists.txt
@@ -0,0 +1,30 @@
+project(Common_examples)
+
+add_executable ( vector_double_off_reader example_vector_double_points_off_reader.cpp )
+target_link_libraries(vector_double_off_reader ${CGAL_LIBRARY})
+file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+add_test(NAME Common_example_vector_double_off_reader COMMAND $<TARGET_FILE:vector_double_off_reader>
+ "alphacomplexdoc.off")
+
+if (DIFF_PATH)
+ # Do not forget to copy test results files in current binary dir
+ file(COPY "vectordoubleoffreader_result.txt" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+
+ add_test(Common_example_vector_double_off_reader_diff_files ${DIFF_PATH}
+ ${CMAKE_CURRENT_BINARY_DIR}/vectordoubleoffreader_result.txt ${CMAKE_CURRENT_BINARY_DIR}/alphacomplexdoc.off.txt)
+endif()
+
+if(NOT CGAL_VERSION VERSION_LESS 4.11.0)
+ add_executable ( cgal_3D_off_reader example_CGAL_3D_points_off_reader.cpp )
+ target_link_libraries(cgal_3D_off_reader ${CGAL_LIBRARY})
+ add_test(NAME Common_example_vector_cgal_3D_off_reader COMMAND $<TARGET_FILE:cgal_3D_off_reader>
+ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off")
+endif()
+
+# requires CGAL and Eigen3
+if(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)
+ add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp )
+ target_link_libraries(cgal_off_reader ${CGAL_LIBRARY})
+ add_test(NAME Common_example_vector_cgal_off_reader COMMAND $<TARGET_FILE:cgal_off_reader>
+ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off")
+endif(NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0)