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

Using an installed Kokkos in a target application using CMake #633

Closed
pkestene opened this issue Feb 8, 2017 · 1 comment
Closed

Using an installed Kokkos in a target application using CMake #633

pkestene opened this issue Feb 8, 2017 · 1 comment
Labels
Enhancement Improve existing capability; will potentially require voting
Milestone

Comments

@pkestene
Copy link
Contributor

pkestene commented Feb 8, 2017

Hello,

For people that already have an application using CMake, and want to use an installed Kokkos, I would like to suggest that Kokkos "make install" should install both Makefile.kokkos and a file kokkos.cmake
containing roughly the same information, but kokkos.cmake could then easily be included in the top-level CMakeLists.txt of the application.

A simple and small modification in core/src/Makefile is required
just add target "build-cmake-kokkos" which will output the required kokkos.cmake

Then on a system with several installed versions of kokkos, if using modulefiles and if modulefiles define env variable KOKKOS_PATH, one only need to put in the target application CMakeLists.txt:

set(CMAKE_MODULE_PATH "$ENV{KOKKOS_PATH}" ${CMAKE_MODULE_PATH})
include(kokkos)

I can provide a pull request if you think it can be useful (at least I do).

@crtrott
Copy link
Member

crtrott commented Feb 10, 2017

Sure go ahead with a pull request.

@hcedwar hcedwar added the Enhancement Improve existing capability; will potentially require voting label Feb 15, 2017
@hcedwar hcedwar added this to the 2017-February milestone Feb 15, 2017
@crtrott crtrott closed this as completed Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

3 participants