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

Allow linking against build tree #6078

Merged
merged 2 commits into from
May 25, 2023

Conversation

masterleinad
Copy link
Contributor

@masterleinad masterleinad commented Apr 24, 2023

This pull request makes it possible to link against Kokkos using the build tree which is, e.g., very useful when trying out how changes in Kokkos influence downstream code (and having changes ready to create pull requests).

This is necessary for trilinos/Trilinos#11779.

@bartlettroscoe
Copy link
Contributor

The only thing that may be needed for building Kokkos inside of Trilinos with the native Kokkos CMake build system is the location of the KokkosConfig.cmake file for the build tree. TriBITS assumes these files are stored under <buildDir>/cmake_packages/<Package>/<Package>Config.cmake (see 4.1 TriBITS-Compliant Internal Packages and 8.7 Using packages from the build tree in downstream CMake projects).

Hopefully this is a simple tweak to the Kokkos CMake files to be able to specify the exact location of where to put this KokkosConfig.cmake file for the build tree.

@masterleinad
Copy link
Contributor Author

The only thing that may be needed for building Kokkos inside of Trilinos with the native Kokkos CMake build system is the location of the KokkosConfig.cmake file for the build tree. TriBITS assumes these files are stored under <buildDir>/cmake_packages/<Package>/<Package>Config.cmake (see 4.1 TriBITS-Compliant Internal Packages and 8.7 Using packages from the build tree in downstream CMake projects).

It seems that trilinos/Trilinos#11779 also works with these files in

<buildDir>/packages/kokkos/

@bartlettroscoe
Copy link
Contributor

It seems that trilinos/Trilinos#11779 also works with these files in

<buildDir>/packages/kokkos/

@masterleinad, the standard build and install of Trilinos packages do not utilize the files under <buildDir>/cmake_packages/. Instead, these are utilized by downstream customers that don't want to install the packages to be able to use the built libraries, etc. (See 8.7 Using packages from the build tree in downstream CMake projects).

I will add a test to the TrilinosInstallTests package to demonstrate and protect this functionality.

Also, these files are utilized for incremental configures and builds as described in Use Case 1: Configure/build all packages then re-configure subset of downstream packages as part of:

I have not added the official documentation for this use case to TriBITS yet, but this use case will speed up re-configures/re-builds for developers that have a local build and just want to reconfigure/rebuild a small subset of downstream packages. (For a small TriBITS project like Trilinos this is not that big of a deal but for larger TriBITS projects like CASL VERA, this will have greater impact on reducing reconfigure times and build-time dependency computation.)

@masterleinad masterleinad marked this pull request as ready for review May 17, 2023 17:49
@dalg24
Copy link
Member

dalg24 commented May 25, 2023

HIP builds timed out but that's ok

@dalg24 dalg24 merged commit e88537f into kokkos:develop May 25, 2023
27 of 28 checks passed
nliber pushed a commit to nliber/kokkos that referenced this pull request Jun 22, 2023
* Allow linking against build tree

* Use Kokkos_BINARY_DIR instead of CMAKE_BINARY_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants