Skip to content

add functionality to install needed header files#145

Closed
vancraar wants to merge 16 commits into
mainfrom
install_header
Closed

add functionality to install needed header files#145
vancraar wants to merge 16 commits into
mainfrom
install_header

Conversation

@vancraar
Copy link
Copy Markdown
Member

Addressing the missing installation of header files mentioned in #140. @freifrauvonbleifrei Which headers should be installed and are they dependent on a certain folder structure, or can they simply all be located together in the include folder?

@freifrauvonbleifrei
Copy link
Copy Markdown
Collaborator

so far, we've been using them with the subfolder paths (#include "task/Task.hpp" etc.), but maybe it would be clearer for library users to use something like #include "discotec/task/Task.hpp" to avoid ambiguity in case someone has a similar/same named header -- what do you think @vancraar ?

@freifrauvonbleifrei
Copy link
Copy Markdown
Collaborator

(maybe we could skip the subpaths and go for #include "discotec/Task.hpp"?)

@freifrauvonbleifrei
Copy link
Copy Markdown
Collaborator

also I would be in favor of a CMake namespace, but this here appears to be insufficient (added in src/CMakeLists.txt):

add_library(discotecTargets INTERFACE)
add_library(discotec::discotec ALIAS discotec)

install(EXPORT discotecTargets
  FILE discotec.cmake
  NAMESPACE discotec::
  DESTINATION lib/cmake/discotec
)

@vancraar do you know how to do it?

@freifrauvonbleifrei
Copy link
Copy Markdown
Collaborator

@vancraar am I right to assume that we would have to introduce a src/discotec subfolder to have the includes work as discotec/task/Task.hpp for both the examples in-code (with add_subdirectory) and for code that uses the installed lib (with find_package)?

freifrauvonbleifrei and others added 2 commits January 28, 2025 10:33
make CI run again by fixing spack version

Co-authored-by: Theresa Pollinger <theresa.pollinger@riken.jp>
@freifrauvonbleifrei
Copy link
Copy Markdown
Collaborator

addressed by #155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants