-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add option for installation #2476
Add option for installation #2476
Conversation
CMakeLists.txt
Outdated
@@ -162,8 +162,9 @@ endif() | |||
################################################################################ | |||
# Installation. | |||
|
|||
option(alpaka_INSTALL "" OFF) |
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.
please add a short doc instead of ""
e.g.
allow installation of alpaka if used as project dependency
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.
please add this option additionally to our documentation: https://github.com/alpaka-group/alpaka/blob/develop/docs/source/advanced/cmake.rst
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.
Both done.
Jobs are failing with
Please, restart! |
@psychocoderHPC We're down to two failing runners: https://gitlab.com/hzdr/crp/alpaka/-/pipelines/1664050946/failures Please restart! |
Allow to install alpaka as part of another project if configured and export its targets into that installation.
Also fixes a bug:
target_include_directories
was given an absolute path (_alpaka_INCLUDE_DIRECTORY
is absolute) to the source directory which meant that dependents always used the headers directly from the source directory if they were using thealpaka::alpaka
target directly. That was never a problem if dependents were applications that didn't expose alpaka headers themselves or the final application to be built used alpaka itself (leading to basically the same situation). But if you try to install a library L that depends on alpaka and a user of the library tries to use L from the installation without using alpaka directly, it needs to find alpaka's headers and they are located in the source directory (which might have been removed already), not in the installation directory.