-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Remove global includes and use target include for all "common" modules. #6008
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
Changes from all commits
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 |
---|---|---|
|
@@ -37,10 +37,7 @@ set(impl_incs | |
|
||
|
||
set(LIB_NAME "pcl_${SUBSYS_NAME}") | ||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") | ||
|
||
add_library(${LIB_NAME} INTERFACE) | ||
target_include_directories(${LIB_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") | ||
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. Would it make sense to keep this line or replace it 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. I could also add the support for interface/header libraries in this PR? |
||
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME}) | ||
target_link_libraries(${LIB_NAME} INTERFACE Boost::boost pcl_common) | ||
|
||
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} HEADER_ONLY) | ||
|
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.
This module does not use
PCL_ADD_LIBRARY
, neither does geometry. Can this line still be removed?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.
It did work due to the include_directories from within PCL_SUBSYS_DEPEND - I have removed it now and changed to use interface libraries for the header only modules.
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 removed the last changes, as it seemlingly only work like this, with the GPU and CUDA submodules. I couldn't "fix" it by adding include_directories in their respective submodules, which was propergated correctly to the other dependencies.
So my reasoning is to keep the include_directories in PCL_SUBSYS_DEPEND, until the latest PR which removes these and fix the remaining issues that aren't present until they are actually removed.
Want me to split the PRs even further or can we merge these 4 step by step?