mirror of https://github.com/CGAL/cgal
fixed cmakelists
This commit is contained in:
parent
77f686242d
commit
017ba35bfa
|
|
@ -6,32 +6,28 @@ project(Shape_regularization_Benchmarks)
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
if(CGAL_FOUND)
|
||||
message(STATUS "Found CGAL")
|
||||
find_package(CGAL REQUIRED)
|
||||
message(STATUS "Found CGAL")
|
||||
|
||||
include(${CGAL_USE_FILE})
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
include(${CGAL_USE_FILE})
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
# Find OSQP library and headers.
|
||||
find_package(OSQP QUIET)
|
||||
include(CGAL_OSQP_support)
|
||||
if(TARGET CGAL::OSQP_support)
|
||||
message(STATUS "Found OSQP")
|
||||
# Find OSQP library and headers.
|
||||
find_package(OSQP QUIET)
|
||||
include(CGAL_OSQP_support)
|
||||
if(TARGET CGAL::OSQP_support)
|
||||
message(STATUS "Found OSQP")
|
||||
|
||||
set(osqp_targets
|
||||
benchmark_contours
|
||||
benchmark_qp_segments)
|
||||
set(osqp_targets
|
||||
benchmark_contours
|
||||
benchmark_qp_segments)
|
||||
|
||||
foreach(osqp_target ${osqp_targets})
|
||||
create_single_source_cgal_program("${osqp_target}.cpp")
|
||||
if(TARGET ${osqp_target})
|
||||
target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
message(STATUS "NOTICE: OSQP was not found. OSQP benchmarks won't be available.")
|
||||
endif()
|
||||
foreach(osqp_target ${osqp_targets})
|
||||
create_single_source_cgal_program("${osqp_target}.cpp")
|
||||
if(TARGET ${osqp_target})
|
||||
target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
message(WARNING "This program requires the CGAL library, and will not be compiled.")
|
||||
message(NOTICE "OSQP was not found. OSQP benchmarks won't be available.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -6,52 +6,47 @@ project(Shape_regularization_Examples)
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
if(CGAL_FOUND)
|
||||
message(STATUS "Found CGAL")
|
||||
find_package(CGAL REQUIRED)
|
||||
message(STATUS "Found CGAL")
|
||||
|
||||
include(${CGAL_USE_FILE})
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
include(${CGAL_USE_FILE})
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
# Find OSQP library and headers.
|
||||
find_package(OSQP QUIET)
|
||||
include(CGAL_OSQP_support)
|
||||
if(TARGET CGAL::OSQP_support)
|
||||
message(STATUS "Found OSQP")
|
||||
# Find OSQP library and headers.
|
||||
find_package(OSQP QUIET)
|
||||
include(CGAL_OSQP_support)
|
||||
if(TARGET CGAL::OSQP_support)
|
||||
message(STATUS "Found OSQP")
|
||||
|
||||
set(osqp_targets
|
||||
regularize_15_segments
|
||||
regularize_100_segments_angles
|
||||
regularize_100_segments_offsets
|
||||
regularize_simple)
|
||||
set(osqp_targets
|
||||
regularize_15_segments
|
||||
regularize_100_segments_angles
|
||||
regularize_100_segments_offsets
|
||||
regularize_simple)
|
||||
|
||||
foreach(osqp_target ${osqp_targets})
|
||||
create_single_source_cgal_program("${osqp_target}.cpp")
|
||||
if(TARGET ${osqp_target})
|
||||
target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Use Eigen.
|
||||
find_package(Eigen3 REQUIRED)
|
||||
include(CGAL_Eigen3_support)
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
message(STATUS "Found Eigen")
|
||||
create_single_source_cgal_program("regularize_real_data_2.cpp")
|
||||
target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support)
|
||||
else()
|
||||
message(STATUS "NOTICE: Eigen was not found. Eigen examples won't be available.")
|
||||
foreach(osqp_target ${osqp_targets})
|
||||
create_single_source_cgal_program("${osqp_target}.cpp")
|
||||
if(TARGET ${osqp_target})
|
||||
target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Use Eigen.
|
||||
find_package(Eigen3 REQUIRED)
|
||||
include(CGAL_Eigen3_support)
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
message(STATUS "Found Eigen")
|
||||
create_single_source_cgal_program("regularize_real_data_2.cpp")
|
||||
target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support)
|
||||
else()
|
||||
message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.")
|
||||
message(NOTICE "Eigen was not found. Eigen examples won't be available.")
|
||||
endif()
|
||||
|
||||
create_single_source_cgal_program("regularize_framework.cpp")
|
||||
create_single_source_cgal_program("regularize_planes.cpp")
|
||||
create_single_source_cgal_program("regularize_contour.cpp")
|
||||
create_single_source_cgal_program("regularize_closed_contour.cpp")
|
||||
create_single_source_cgal_program("regularize_open_contour.cpp")
|
||||
|
||||
else()
|
||||
message(WARNING "This program requires the CGAL library, and will not be compiled.")
|
||||
message(NOTICE "OSQP was not found. OSQP examples won't be available.")
|
||||
endif()
|
||||
|
||||
create_single_source_cgal_program("regularize_framework.cpp")
|
||||
create_single_source_cgal_program("regularize_planes.cpp")
|
||||
create_single_source_cgal_program("regularize_contour.cpp")
|
||||
create_single_source_cgal_program("regularize_closed_contour.cpp")
|
||||
create_single_source_cgal_program("regularize_open_contour.cpp")
|
||||
|
|
|
|||
|
|
@ -6,68 +6,63 @@ project(Shape_regularization_Tests)
|
|||
cmake_minimum_required(VERSION 3.1...3.15)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
if(CGAL_FOUND)
|
||||
message(STATUS "Found CGAL")
|
||||
find_package(CGAL REQUIRED)
|
||||
message(STATUS "Found CGAL")
|
||||
|
||||
include(${CGAL_USE_FILE})
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
include(${CGAL_USE_FILE})
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
# Find OSQP library and headers.
|
||||
find_package(OSQP QUIET)
|
||||
include(CGAL_OSQP_support)
|
||||
if(TARGET CGAL::OSQP_support)
|
||||
message(STATUS "Found OSQP")
|
||||
# Find OSQP library and headers.
|
||||
find_package(OSQP QUIET)
|
||||
include(CGAL_OSQP_support)
|
||||
if(TARGET CGAL::OSQP_support)
|
||||
message(STATUS "Found OSQP")
|
||||
|
||||
set(osqp_targets
|
||||
test_segments
|
||||
test_overloads
|
||||
test_0_segments
|
||||
test_1_segment
|
||||
test_2_segments
|
||||
test_3_segments
|
||||
test_4_segments
|
||||
test_100_segments_angles
|
||||
test_100_segments_offsets)
|
||||
set(osqp_targets
|
||||
test_segments
|
||||
test_overloads
|
||||
test_0_segments
|
||||
test_1_segment
|
||||
test_2_segments
|
||||
test_3_segments
|
||||
test_4_segments
|
||||
test_100_segments_angles
|
||||
test_100_segments_offsets)
|
||||
|
||||
foreach(osqp_target ${osqp_targets})
|
||||
create_single_source_cgal_program("${osqp_target}.cpp")
|
||||
if(TARGET ${osqp_target})
|
||||
target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
message(STATUS "NOTICE: OSQP was not found. OSQP tests won't be available.")
|
||||
endif()
|
||||
|
||||
set(targets
|
||||
test_neighbor_query
|
||||
test_groups_parallel
|
||||
test_groups_collinear
|
||||
test_groups_orthogonal
|
||||
test_unique_segments
|
||||
test_plane_regularization
|
||||
test_closed_contour_3_edges
|
||||
test_closed_contour_4_edges
|
||||
test_closed_contour_6_edges
|
||||
test_closed_contour_10_edges
|
||||
test_open_contour_1_edge
|
||||
test_open_contour_2_edges
|
||||
test_open_contour_3_edges
|
||||
test_open_contour_5_edges
|
||||
test_open_contour_9_edges
|
||||
test_equal_contours
|
||||
test_directions_longest
|
||||
test_directions_multiple_1
|
||||
test_directions_multiple_2
|
||||
test_directions_multiple_3
|
||||
test_directions_user_defined
|
||||
test_contour_orientation)
|
||||
|
||||
foreach(target ${targets})
|
||||
create_single_source_cgal_program("${target}.cpp")
|
||||
foreach(osqp_target ${osqp_targets})
|
||||
create_single_source_cgal_program("${osqp_target}.cpp")
|
||||
if(TARGET ${osqp_target})
|
||||
target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
else()
|
||||
message(WARNING "This program requires the CGAL library, and will not be compiled.")
|
||||
message(NOTICE "OSQP was not found. OSQP tests won't be available.")
|
||||
endif()
|
||||
|
||||
set(targets
|
||||
test_neighbor_query
|
||||
test_groups_parallel
|
||||
test_groups_collinear
|
||||
test_groups_orthogonal
|
||||
test_unique_segments
|
||||
test_plane_regularization
|
||||
test_closed_contour_3_edges
|
||||
test_closed_contour_4_edges
|
||||
test_closed_contour_6_edges
|
||||
test_closed_contour_10_edges
|
||||
test_open_contour_1_edge
|
||||
test_open_contour_2_edges
|
||||
test_open_contour_3_edges
|
||||
test_open_contour_5_edges
|
||||
test_open_contour_9_edges
|
||||
test_equal_contours
|
||||
test_directions_longest
|
||||
test_directions_multiple_1
|
||||
test_directions_multiple_2
|
||||
test_directions_multiple_3
|
||||
test_directions_user_defined
|
||||
test_contour_orientation)
|
||||
|
||||
foreach(target ${targets})
|
||||
create_single_source_cgal_program("${target}.cpp")
|
||||
endforeach()
|
||||
|
|
|
|||
Loading…
Reference in New Issue