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

Cmake build: wrong include install directory #668

Closed
bartgol opened this issue Mar 6, 2017 · 2 comments
Closed

Cmake build: wrong include install directory #668

bartgol opened this issue Mar 6, 2017 · 2 comments
Labels
Enhancement Improve existing capability; will potentially require voting
Milestone

Comments

@bartgol
Copy link
Contributor

bartgol commented Mar 6, 2017

In the files core/src/CMakeLists.txt and container/src/CMakeLists.txt, the following variable is set:

SET(TRILINOS_INCDIR ${CMAKE_INSTALL_PREFIX}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR})

Besides mentioning trilinos (which does not belong here, since it's a standalone kokkos package), this is also buggy: the variable ${PROJECT_NAME}_INSTALL_INCLUDE_DIR is never set, which causes most of the files to be installed not in install-dir/include/ but directly in install-dir/. The only exceptions are the files in the HEADERS_PUBLIC variable, which are correctly installed by the TRIBITS_ADD_LIBRARY function. This not only generates a "less structures" installation folder, but also causes some issues, since an application using Kokkos most likely uses kokkos-install-dir/include as a directory where to find kokkos headers, hence missing all headers that are directly put in kokkos-install-dir (or in its subdirectories other than include).

A possible fix (I checked, and it works) would be to replace the above cmake line with

SET(KOKKOS_INCDIR ${CMAKE_INSTALL_PREFIX}/include)

Note: I wrote KOKKOS instead of TRILINOS since there's not trilinos involved here, and I hard-coded 'include' as the name of the subdirectory, since this is already done by TRIBITS_ADD_LIBRARY anyways...

@gmackey
Copy link
Contributor

gmackey commented Mar 17, 2017

This issue is fixed in the new pure CMake version.

@hcedwar hcedwar added the Enhancement Improve existing capability; will potentially require voting label Apr 5, 2017
@hcedwar hcedwar added this to the 2017-April-end milestone Apr 5, 2017
@crtrott crtrott modified the milestones: 2017-April-end, 2017-June-end Apr 26, 2017
@ibaned
Copy link
Contributor

ibaned commented Jun 14, 2017

We think this is fixed. Please reopen if not.

@ibaned ibaned closed this as completed Jun 14, 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

5 participants