Skip to content
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

Merged

Conversation

chillenzer
Copy link
Contributor

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 the alpaka::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.

CMakeLists.txt Outdated
@@ -162,8 +162,9 @@ endif()
################################################################################
# Installation.

option(alpaka_INSTALL "" OFF)
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both done.

@chillenzer
Copy link
Contributor Author

Jobs are failing with

Error: retrieving gpg key timed out.
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

Please, restart!

@chillenzer
Copy link
Contributor Author

@psychocoderHPC We're down to two failing runners: https://gitlab.com/hzdr/crp/alpaka/-/pipelines/1664050946/failures Please restart!

@psychocoderHPC psychocoderHPC merged commit 95c0bf2 into alpaka-group:develop Feb 12, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Install installation & packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants