-
Notifications
You must be signed in to change notification settings - Fork 14
Fix export of optional parts in base/types #29
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
Conversation
76dd20d
to
e6bb191
Compare
Depends on orocos-toolchain/orogen/pull/117 |
I guess one way would be to define something in the opaque wrapper, and use this in the |
@doudou any comments then on the current approach, which requires also a minimal change in orogen? |
base.orogen
Outdated
if has_library?('base-lib') | ||
sisl_available = has_library?('base-lib-sisl') | ||
|
||
if sisl_available |
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 is inconsistent with the next line. It's either both base-lib
or both base-lib-sisl
.
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.
ack
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.
changed it to base-types-sisl
CMakeLists.txt
Outdated
list(APPEND TOOLKIT_ADDITIONAL_SOURCES ${CMAKE_SOURCE_DIR}/src/spline.cpp) | ||
list(APPEND TOOLKIT_ADDITIONAL_LIBRARIES ${BASELIB_LIBRARIES} ${SISL_LIBRARIES}) | ||
list(APPEND TOOLKIT_ADDITIONAL_LIBRARIES ${SISL_LIBRARIES}) | ||
list(APPEND PKG_CFLAGS "-DWITH_SISL=1") |
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.
Rather than this being done implicitly. I would actually prefer adding an explicit add_definition
to OroGen's typekit definition, and have it code-generate the add_definitions
. Same for the additional sources. It would place all of the logic in the orogen file, which feels better somehow.
The addition of SISL in TOOLKIT_ADDITIONAL_LIBRARIES feels weird here by the way ... Since we're using_library
it should not be needed - which would simplify the whole block to only be adding src/spline.cpp
.
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.
Rather than this being done implicitly. I would actually prefer adding an explicit
add_definition
to OroGen's typekit definition, and have it code-generate theadd_definitions
. Same for the additional sources. It would place all of the logic in the orogen file, which feels better somehow.
You mean the following way:
using_library 'base-lib-sisl'
typekit.add_definition("WITH_SISL",1)
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.
Something like that, yes.
CMakeLists.txt
Outdated
|
||
pkg_check_modules(BASELIB REQUIRED "base-lib") | ||
include_directories(${BASELIB_INCLUDE_DIRS}) | ||
list(APPEND TOOLKIT_ADDITIONAL_LIBRARIES ${BASELIB_LIBRARIES}) |
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 toolkit_additional_libraries is puzzling me ...
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 has been part of the previously sisl-dependent block. Since it is not optional anymore I updated it. So 'puzzling' means 'is not needed'?
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 got that it was there ... but I wonder why (if ?) it is needed.
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.
All types are contained in base-types library. So I removed the base-lib part.
e6bb191
to
89dedf3
Compare
Is this flag really needed in the rock context? I mean SISL is an additional, mostly not needed dependency when you want to use base-types with a library outside rock e.g. https://github.com/envire/envire-envire_core This is why it should be truely optional in the base-types repo, but i don't see why it should be in the orogen component, the manifest.xml of base-types lists it as optional, but it is defined in the package_set, so it is installes automatically and availabel anyways. |
I do not have a real use case, but was only fixing the existing setup.
You can still control the dependencies that you install via exclude_packages in the manifest. So that is not a good reason.
Depends whether other reasons are brought up to support this optionality. |
Since the consensus it to remove the optionality on base/orogen/types, then let's. SISL is part of "Core Rock", base/orogen/types should depend on it unconditionally. If all in agreement, please close this PR. |
89dedf3
to
2c527ab
Compare
Updated the PR to do the 'cleanup' of the optional parts |
Would it make sense to add an explicit dependency on |
Good question. It would prevent a failing build without explanation in case someone writes a new package_set including base/types and base/orogen/types, but how likely is this? |
Explanation definitely makes sense.
add 'external/sisl' to the manifest.xml, |
Sounds good |
2c527ab
to
01cbf60
Compare
01cbf60
to
d7f7b39
Compare
Updated |
@doudou Any suggestions to make the Opaques part truely optional. Right now I assume I have to adapt touch orogen to permit injection of extra build flags in base-typekit.pc.in?