-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes when neither LEDA nor GMP is available #7960
Conversation
find_package(CGAL REQUIRED COMPONENTS Core) | ||
find_package(LEDA QUIET) | ||
|
||
# create a target per cppfile | ||
file( | ||
GLOB cppfiles | ||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) | ||
foreach(cppfile ${cppfiles}) | ||
create_single_source_cgal_program("${cppfile}") | ||
endforeach() | ||
create_single_source_cgal_program("cones_inexact.cpp") | ||
create_single_source_cgal_program("theta_inexact.cpp") | ||
create_single_source_cgal_program("yao_inexact.cpp") | ||
|
||
if(CGAL_Core_FOUND OR LEDA_FOUND) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is strange. find_package(CGAL REQUIRED COMPONENTS Core)
should stop the compilation if Core
is not found. That is certainly an error in CGALConfig.cmake
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can open an independent issue if we want to fix that. OPTIONAL keyword should indeed be used.
This reverts commit 00219bc.
Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake
Outdated
Show resolved
Hide resolved
Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake
Outdated
Show resolved
Hide resolved
Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_with_cmake
Outdated
Show resolved
Hide resolved
create_single_source_cgal_program("issue4533.cpp") | ||
create_single_source_cgal_program("issue4684.cpp") | ||
create_single_source_cgal_program("test_sls.cpp") | ||
create_single_source_cgal_program("test_sls_previous_issues.cpp") | ||
create_single_source_cgal_program("test_sls_traits.cpp") | ||
create_single_source_cgal_program("test_straight_skeleton_copy.cpp") | ||
|
||
if(CGAL_Qt6_FOUND) | ||
target_link_libraries(issue4684 PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(issue7149 PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(issue7284 PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(test_sls_previous_issues PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(test_sls_offset PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(test_sls_weighted_polygons_with_holes PUBLIC CGAL::CGAL_Basic_viewer) | ||
endif() | ||
|
||
if (CGAL_Core_FOUND OR LEDA_FOUND) | ||
create_single_source_cgal_program("test_sls_offset.cpp") | ||
create_single_source_cgal_program("issue7284.cpp") | ||
create_single_source_cgal_program("test_sls_simple.cpp") | ||
create_single_source_cgal_program("test_sls_weighted_polygons_with_holes.cpp") | ||
create_single_source_cgal_program("issue7149.cpp") | ||
if(CGAL_Qt6_FOUND) | ||
target_link_libraries(issue7149 PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(issue7284 PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(test_sls_offset PUBLIC CGAL::CGAL_Basic_viewer) | ||
target_link_libraries(test_sls_weighted_polygons_with_holes PUBLIC CGAL::CGAL_Basic_viewer) | ||
endif() | ||
else() | ||
message("NOTICE: Some test require CGAL_Core (or LEDA), and will not be compiled.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a more flexible way possible?
(see e.g. https://github.com/doxygen/doxygen/blob/master/examples/CMakeLists.txt and look for BASIC_EXAMPLES. still a list but a bit more flexible, maybe something is possible here as well...)
Successfully tested in CGAL-6.0-Ic-147 |
This pull-request was previously marked with the label |
No description provided.