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

include/deal.II/bundled added to DEAL_II_INCLUDE_DIRS in deal.IIConfig.cmake even when it doesn't exist #9114

Closed
alexrobomind opened this issue Nov 30, 2019 · 1 comment · Fixed by #9115

Comments

@alexrobomind
Copy link
Contributor

If deal.II is compiled with DEAL_II_ALLOW_BUNDLED=Off (as it is done by the spack package), the include/bundled directory is never created. It is however added to the list of include directories in DEAL_II_INCLUDE_DIRS. This is not a problem when setting up a target via dealii_setup_target, but when I create a dependent library that exports this directory in its INTERFACE_INCLUDE_DIRECTORIES property (which in my honest opinion the targets exported by deal.II already should do), CMake complains with an error message when using that derived library

CMake Error in CMakeLists.txt:
  Imported target "[derived library name]" includes non-existent path

    "[deal.II install directory]/include/deal.II/bundled"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

The easiest solution to this would probably to create an empty include/bundled folder just in case, but I don't know where to best put that in the cmake scripts.

@tamiko
Copy link
Member

tamiko commented Nov 30, 2019

@alexrobomind Will fix it in a minute.

INTERFACE_INCLUDE_DIRECTORIES property (which in my honest opinion the targets exported by deal.II already should do)

We actually merged this changeset already two times (over the last 5 years) and reverted it again due to some older cmake versions having massive problems with it. We might revisit this again for the next release and increase the minimal supported version.

tamiko added a commit to tamiko/dealii that referenced this issue Nov 30, 2019
Avoid recording a nonexistent include directory in case we do not
install any bundled header files.

Fixes dealii#9114
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 a pull request may close this issue.

2 participants