-
Notifications
You must be signed in to change notification settings - Fork 621
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
DALI as a git submodule #1924
DALI as a git submodule #1924
Conversation
CMakeLists.txt
Outdated
|
||
export(PACKAGE dali) |
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'd approach it a little bit differently: I think we should export individual targets within some namespace, e.g. using this:
export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>]
[APPEND] FILE <filename> [EXPORT_LINK_INTERFACE_LIBRARIES])
There you could export dali, dali_operators, dali_core etc...
.
Usage could be following:
add_subdirectory(extern/DALI)
target_link_libraries(mylib DALI::dali_core DALI::dali_kernels)
On top of that, we can expose convenient target that gathers every DALI target, so that user can go:
add_subdirectory(extern/DALI)
target_link_libraries(mylib DALI::DALI)
But I'd like to hear what others think about it
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.
you are probably right :)
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 so only the listed targets are exported
!build |
CI MESSAGE: [1291181]: BUILD STARTED |
CI MESSAGE: [1291181]: BUILD PASSED |
add_library(DALI::dali ALIAS dali) | ||
add_library(DALI::dali_core ALIAS dali_core) | ||
add_library(DALI::dali_kernels ALIAS dali_kernels) | ||
add_library(DALI::dali_operators ALIAS dali_operators) |
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.
Is it possible to additionally create one target, that puts together all these four?
One to rule them all ;)
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 do not think so, at least I did not find one
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
Change CMakeLists paths to ${PROJECT_SOURCE_DIR}, add export of DALI
Few path in the CMakeLists were changed because they assumed DALI was the main project that was currently built
[ Describe here what is the most important part that reviewers should focus on. ]
Checked if DALI is building after changes
[ Describe here if documentation and examples were updated. ]
JIRA TASK: NA