fixed cmakelists

This commit is contained in:
Dmitry Anisimov 2021-08-04 15:51:48 +02:00
parent 8e1fad7818
commit e93c2e4bbf
3 changed files with 83 additions and 98 deletions

View File

@ -6,31 +6,26 @@ project(Barycentric_coordinates_2_Benchmarks)
cmake_minimum_required(VERSION 3.1...3.15)
set(CMAKE_CXX_STANDARD 14)
find_package(CGAL QUIET COMPONENTS Core)
if(CGAL_FOUND)
find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
create_single_source_cgal_program("benchmark_segment_coordinates.cpp")
create_single_source_cgal_program("benchmark_triangle_coordinates.cpp")
create_single_source_cgal_program("benchmark_polygon_4_vertices.cpp")
create_single_source_cgal_program("benchmark_polygon_16_vertices.cpp")
create_single_source_cgal_program("benchmark_polygon_100_vertices.cpp")
create_single_source_cgal_program("benchmark_mv_34_vertices.cpp")
create_single_source_cgal_program("benchmark_segment_coordinates.cpp")
create_single_source_cgal_program("benchmark_triangle_coordinates.cpp")
create_single_source_cgal_program("benchmark_polygon_4_vertices.cpp")
create_single_source_cgal_program("benchmark_polygon_16_vertices.cpp")
create_single_source_cgal_program("benchmark_polygon_100_vertices.cpp")
create_single_source_cgal_program("benchmark_mv_34_vertices.cpp")
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
find_package(Eigen3 REQUIRED)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_n_vertices.cpp")
target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_n_vertices.cpp")
target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support)
else()
message(WARNING "Several coordinates require the Eigen library, and will not be compiled.")
endif()
else()
message(WARNING "This program requires the CGAL library, and will not be compiled.")
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
endif()

View File

@ -6,36 +6,31 @@ project(Barycentric_coordinates_2_Examples)
cmake_minimum_required(VERSION 3.1...3.15)
set(CMAKE_CXX_STANDARD 14)
find_package(CGAL QUIET COMPONENTS Core)
if(CGAL_FOUND)
find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
create_single_source_cgal_program("segment_coordinates.cpp")
create_single_source_cgal_program("triangle_coordinates.cpp")
create_single_source_cgal_program("wachspress_coordinates.cpp")
create_single_source_cgal_program("mean_value_coordinates.cpp")
create_single_source_cgal_program("discrete_harmonic_coordinates.cpp")
create_single_source_cgal_program("terrain_height_modeling.cpp")
create_single_source_cgal_program("segment_coordinates.cpp")
create_single_source_cgal_program("triangle_coordinates.cpp")
create_single_source_cgal_program("wachspress_coordinates.cpp")
create_single_source_cgal_program("mean_value_coordinates.cpp")
create_single_source_cgal_program("discrete_harmonic_coordinates.cpp")
create_single_source_cgal_program("terrain_height_modeling.cpp")
# this code is deprecated:
create_single_source_cgal_program("deprecated_coordinates.cpp")
# this code is deprecated:
create_single_source_cgal_program("deprecated_coordinates.cpp")
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
find_package(Eigen3 REQUIRED)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("affine_coordinates.cpp")
target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("harmonic_coordinates.cpp")
target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("shape_deformation.cpp")
target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("affine_coordinates.cpp")
target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("harmonic_coordinates.cpp")
target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("shape_deformation.cpp")
target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support)
else()
message(WARNING "Several coordinates require the Eigen library, and will not be compiled.")
endif()
else()
message(WARNING "This program requires the CGAL library, and will not be compiled.")
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
endif()

View File

@ -6,65 +6,60 @@ project(Barycentric_coordinates_2_Tests)
cmake_minimum_required(VERSION 3.1...3.15)
set(CMAKE_CXX_STANDARD 14)
find_package(CGAL QUIET COMPONENTS Core)
if(CGAL_FOUND)
find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
create_single_source_cgal_program("test_almost_degenerate_segment.cpp")
create_single_source_cgal_program("test_segment_coordinates.cpp")
create_single_source_cgal_program("test_segment_coordinates_with_offset.cpp")
create_single_source_cgal_program("test_almost_degenerate_segment.cpp")
create_single_source_cgal_program("test_segment_coordinates.cpp")
create_single_source_cgal_program("test_segment_coordinates_with_offset.cpp")
create_single_source_cgal_program("test_almost_degenerate_triangle.cpp")
create_single_source_cgal_program("test_triangle_coordinates.cpp")
create_single_source_cgal_program("test_almost_degenerate_triangle.cpp")
create_single_source_cgal_program("test_triangle_coordinates.cpp")
create_single_source_cgal_program("test_boundary_coordinates_at_vertices.cpp")
create_single_source_cgal_program("test_boundary_coordinates_on_edges.cpp")
create_single_source_cgal_program("test_bc_cgal_polygons.cpp")
create_single_source_cgal_program("test_boundary_coordinates_at_vertices.cpp")
create_single_source_cgal_program("test_boundary_coordinates_on_edges.cpp")
create_single_source_cgal_program("test_bc_cgal_polygons.cpp")
create_single_source_cgal_program("test_wp_dh_unit_square.cpp")
create_single_source_cgal_program("test_wp_almost_degenerate_polygon.cpp")
create_single_source_cgal_program("test_wp_const_linear_precision.cpp")
create_single_source_cgal_program("test_wp_triangle.cpp")
create_single_source_cgal_program("test_wp_weights.cpp")
create_single_source_cgal_program("test_wp_dh_unit_square.cpp")
create_single_source_cgal_program("test_wp_almost_degenerate_polygon.cpp")
create_single_source_cgal_program("test_wp_const_linear_precision.cpp")
create_single_source_cgal_program("test_wp_triangle.cpp")
create_single_source_cgal_program("test_wp_weights.cpp")
create_single_source_cgal_program("test_mv_special_points.cpp")
create_single_source_cgal_program("test_mv_weakly_convex_polygon.cpp")
create_single_source_cgal_program("test_mv_const_linear_precision.cpp")
create_single_source_cgal_program("test_mv_triangle.cpp")
create_single_source_cgal_program("test_mv_weights.cpp")
create_single_source_cgal_program("test_mv_special_points.cpp")
create_single_source_cgal_program("test_mv_weakly_convex_polygon.cpp")
create_single_source_cgal_program("test_mv_const_linear_precision.cpp")
create_single_source_cgal_program("test_mv_triangle.cpp")
create_single_source_cgal_program("test_mv_weights.cpp")
create_single_source_cgal_program("test_dh_almost_degenerate_polygon.cpp")
create_single_source_cgal_program("test_dh_const_linear_precision.cpp")
create_single_source_cgal_program("test_dh_triangle.cpp")
create_single_source_cgal_program("test_dh_weights.cpp")
create_single_source_cgal_program("test_dh_almost_degenerate_polygon.cpp")
create_single_source_cgal_program("test_dh_const_linear_precision.cpp")
create_single_source_cgal_program("test_dh_triangle.cpp")
create_single_source_cgal_program("test_dh_weights.cpp")
# this code is deprecated:
create_single_source_cgal_program("test_sc_deprecated_api.cpp")
create_single_source_cgal_program("test_tc_deprecated_api.cpp")
create_single_source_cgal_program("test_wp_deprecated_api.cpp")
create_single_source_cgal_program("test_mv_deprecated_api.cpp")
create_single_source_cgal_program("test_dh_deprecated_api.cpp")
# this code is deprecated:
create_single_source_cgal_program("test_sc_deprecated_api.cpp")
create_single_source_cgal_program("test_tc_deprecated_api.cpp")
create_single_source_cgal_program("test_wp_deprecated_api.cpp")
create_single_source_cgal_program("test_mv_deprecated_api.cpp")
create_single_source_cgal_program("test_dh_deprecated_api.cpp")
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
find_package(Eigen3 REQUIRED)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_unit_square.cpp")
target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_const_linear_precision.cpp")
target_link_libraries(test_hm_const_linear_precision PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_triangle.cpp")
target_link_libraries(test_hm_triangle PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_bc_projection_traits.cpp")
target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_bc_all_coordinates.cpp")
target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_unit_square.cpp")
target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_const_linear_precision.cpp")
target_link_libraries(test_hm_const_linear_precision PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_triangle.cpp")
target_link_libraries(test_hm_triangle PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_bc_projection_traits.cpp")
target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_bc_all_coordinates.cpp")
target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support)
else()
message(WARNING "Several coordinates require the Eigen library, and will not be compiled.")
endif()
else()
message(WARNING "This program requires the CGAL library, and will not be compiled.")
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
endif()