-
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
PSP_3: Fix pointmatcher support #5350
Changes from 3 commits
fa22cd9
ff9d714
99a31e0
631aa06
4ed3b01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) | ||
add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) | ||
set_target_properties(CGAL::pointmatcher_support PROPERTIES | ||
INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_POINTMATCHER" | ||
INTERFACE_INCLUDE_DIRECTORIES "${libpointmatcher_INCLUDE_DIR}" | ||
INTERFACE_LINK_LIBRARIES "${libpointmatcher_LIBRARIES}") | ||
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono) | ||
endif() | ||
if(NOT (WIN32 OR CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
OR ( Boost_chrono_FOUND | ||
AND Boost_thread_FOUND | ||
AND Boost_filesystem_FOUND | ||
AND Boost_system_FOUND | ||
AND Boost_program_options_FOUND | ||
AND Boost_date_time_FOUND) ) | ||
add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) | ||
target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER") | ||
target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") | ||
target_link_libraries(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_LIBRARIES}") | ||
else() | ||
message(STATUS "NOTICE : the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") | ||
endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not know the details... Are those Boost libraries only needed on Windows? What I do not like is that this code seems fragile: it works with the version of @sgiraudot @maxGimeno If that library is important for us, I think we should work with the maintainers of add_library(CGAL::pointmatcher_support INTERFACE IMPORTED)
target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER")
target_link_libraries(CGAL::pointmatcher_support INTERFACE libpointmatcher::libpointmatcher) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At the current time, either we fix the support in our code, either we completely drop the support of the Windows platforms. I already reported the bugs in Pointmatcher's cmake scripts here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, we don't need it to work with the next version, as it is documented that we do not support another version. At least until they fix the bugs we reported. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I know that is documented that way, but that is very aggressive for our users. Imagine somebody said "we only support CGAL version 4.13.2"... That is why, if that library is important for us (@sgiraudot?) then we should collaborate with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's really "just" a wrapper. It's important in the sense that it is something that we do provide and thus we should make sure it works, but I'm not sure how much time and effort it makes sense to put into that (especially if they have an almost non-existent Windows support, it might be a long run to make it clean). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The same way we helped Eigen3 with their Windows support, maybe we could help |
||
endif() |
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.
I think that paragraph needs a bit a polish and rewording.