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 options without prefix #302

Open
dutkalex opened this issue Apr 24, 2024 · 9 comments
Open

CMake options without prefix #302

dutkalex opened this issue Apr 24, 2024 · 9 comments

Comments

@dutkalex
Copy link

dutkalex commented Apr 24, 2024

Description
The mpi, openmp, json, enable-file-deprecated, enable_p6est, enable_p8est, vtk_binary and zlib CMake options can easily collide with other projects. I think that it is a significant problem especially for the mpi, openmp, jsonand zlib, which should be renamed to something like P4EST_ENABLE_MPI, P4EST_ENABLE_OPENMP, P4EST_ENABLE_JSON and P4EST_ENABLE_ZLIB respectively. It would also disambiguate the exact behavior associated to each option. This is a very low-hanging fruit in terms of hardening of the CMake build system, and improving the interoperability with external projects. I can easily propose a small PR to fix this.

To Reproduce

mkdir build
cd build
ccmake ..
@cburstedde
Copy link
Owner

cburstedde commented Apr 24, 2024 via email

@dutkalex
Copy link
Author

dutkalex commented Apr 24, 2024

Please go ahead if you like.

Should I branch from the master or the develop?

@dutkalex
Copy link
Author

Some problems originate from the sc library, so fixing this will require a PR on the sc repo too.

@cburstedde
Copy link
Owner

cburstedde commented Apr 25, 2024 via email

@dutkalex
Copy link
Author

Yes I agree. I will start investigating the question. It is not obvious to me at the time whether the two can be decoupled or not...

@dutkalex
Copy link
Author

dutkalex commented Apr 25, 2024

The PR for libsc is ready. Waiting on your feedback for integration. Once this is merged in the develop, I'll be able to see what needs to be adapted on the p4est side...

@cburstedde
Copy link
Owner

The PR for libsc is ready. Waiting on your feedback for integration. Once this is merged in the develop, I'll be able to see what needs to be adapted on the p4est side...

This sounds good, thanks for keeping at it!

@cburstedde
Copy link
Owner

Once we get the libsc CMake/CI to go through, I'll update the sc submodule in p4est. Then we may proceed along the same lines. We can use the CMake variables P4EST_ENABLE_* throughout and leave the one -Dmpi shortcut as with libsc.

@cburstedde
Copy link
Owner

The sc updates are merged. Would you see some room for yourself to align the p4est behavior to sc (assuming the sc behavior is to your liking/consistent, please let us know)?

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