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 error when configuring with P4EST #15759

Closed
davidscn opened this issue Jul 17, 2023 · 2 comments
Closed

CMake error when configuring with P4EST #15759

davidscn opened this issue Jul 17, 2023 · 2 comments

Comments

@davidscn
Copy link
Contributor

While trying to update my deal.II version to the latest release (9.5.1), cmake reported the following error:

CMake Error in CMakeLists.txt:
  Target "interface_p4est" INTERFACE_INCLUDE_DIRECTORIES property contains
  path:

    "~/dealii/doc/external-libs/p4est-install/FAST/include"

  which is prefixed in the source directory.

I'm using CMake version 3.22.1 and the latest p4est release (p4est-2.8.5.5-9ddbb). To build p4est, I used the setup script provided in the repository (doc/external-libs/p4est-setup.sh) and tell CMake about the installation via

cmake   -D DEAL_II_WITH_P4EST="ON"  \
        -D P4EST_DIR="$HOME/doc/external-libs/p4est-install"  \
        <more-options> ..

This worked out pretty well until the latest release and I'm a bit puzzled on how to fix it without looking into CMake details. Of course, I can provide more CMake logging details, if necessary.

@marcfehling
Copy link
Member

You have installed p4est in the source directory of dealii, and tried to configure dealii with it. CMake complains about that

... which is prefixed in the source directory

After the rework of our CMake configuration with the latest release, this is no longer allowed. I believe if you install p4est in a separate folder unrelated to dealii, this should no longer be a problem.

@davidscn
Copy link
Contributor Author

Ah ok. Installing it in a different directory works, thanks a lot. The missing piece of information (from CMake) was that the in-source installation is not allowed.

Having said that, it might a good idea to make the install location in the setup script mandatory p4est-setup.sh <p4est_tar.gz_file> [<install location>], as the default usage might lead to an invalid p4est installation. Will close here as the issue is on the user side.

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

No branches or pull requests

2 participants