fixed cmakelists

This commit is contained in:
Dmitry Anisimov 2021-08-04 15:26:18 +02:00
parent 77f686242d
commit 017ba35bfa
3 changed files with 107 additions and 121 deletions

View File

@ -6,8 +6,7 @@ project(Shape_regularization_Benchmarks)
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.1...3.15)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
find_package(CGAL QUIET COMPONENTS Core) find_package(CGAL REQUIRED)
if(CGAL_FOUND)
message(STATUS "Found CGAL") message(STATUS "Found CGAL")
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
@ -30,8 +29,5 @@ if(CGAL_FOUND)
endif() endif()
endforeach() endforeach()
else() else()
message(STATUS "NOTICE: OSQP was not found. OSQP benchmarks won't be available.") message(NOTICE "OSQP was not found. OSQP benchmarks won't be available.")
endif()
else()
message(WARNING "This program requires the CGAL library, and will not be compiled.")
endif() endif()

View File

@ -6,8 +6,7 @@ project(Shape_regularization_Examples)
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.1...3.15)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
find_package(CGAL QUIET COMPONENTS Core) find_package(CGAL REQUIRED)
if(CGAL_FOUND)
message(STATUS "Found CGAL") message(STATUS "Found CGAL")
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
@ -40,10 +39,10 @@ if(CGAL_FOUND)
create_single_source_cgal_program("regularize_real_data_2.cpp") create_single_source_cgal_program("regularize_real_data_2.cpp")
target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support) target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support)
else() else()
message(STATUS "NOTICE: Eigen was not found. Eigen examples won't be available.") message(NOTICE "Eigen was not found. Eigen examples won't be available.")
endif() endif()
else() else()
message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") message(NOTICE "OSQP was not found. OSQP examples won't be available.")
endif() endif()
create_single_source_cgal_program("regularize_framework.cpp") create_single_source_cgal_program("regularize_framework.cpp")
@ -51,7 +50,3 @@ if(CGAL_FOUND)
create_single_source_cgal_program("regularize_contour.cpp") create_single_source_cgal_program("regularize_contour.cpp")
create_single_source_cgal_program("regularize_closed_contour.cpp") create_single_source_cgal_program("regularize_closed_contour.cpp")
create_single_source_cgal_program("regularize_open_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.")
endif()

View File

@ -6,8 +6,7 @@ project(Shape_regularization_Tests)
cmake_minimum_required(VERSION 3.1...3.15) cmake_minimum_required(VERSION 3.1...3.15)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
find_package(CGAL QUIET COMPONENTS Core) find_package(CGAL REQUIRED)
if(CGAL_FOUND)
message(STATUS "Found CGAL") message(STATUS "Found CGAL")
include(${CGAL_USE_FILE}) include(${CGAL_USE_FILE})
@ -37,7 +36,7 @@ if(CGAL_FOUND)
endif() endif()
endforeach() endforeach()
else() else()
message(STATUS "NOTICE: OSQP was not found. OSQP tests won't be available.") message(NOTICE "OSQP was not found. OSQP tests won't be available.")
endif() endif()
set(targets set(targets
@ -67,7 +66,3 @@ if(CGAL_FOUND)
foreach(target ${targets}) foreach(target ${targets})
create_single_source_cgal_program("${target}.cpp") create_single_source_cgal_program("${target}.cpp")
endforeach() endforeach()
else()
message(WARNING "This program requires the CGAL library, and will not be compiled.")
endif()