-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix CMake variables #178
Fix CMake variables #178
Conversation
Thanks! Unifying the variables is great. Would you mind adding a file doc/author_.txt like the others, releasing your code under the FreeBSD license? And if you could add a line to doc/release_notes.txt? (Wondering why all of a sudden the autotools ./bootstrap script dies on Darwin (unrelated).) Any comments @scivision -- thinking about callability from other software besides p4est. |
Done! @cburstedde |
Thanks for the simplifications! We tried out the changes and setting
|
@tim-griesbach @hannesbrandt Thanks for letting me know. This should work better now :) |
Done! @cburstedde
Thanks for the initiative! Indeed it is better to have one variable for one
feature, not two. On the other hand, we lose the simplicity of -Dmpi=ON
that we were enjoying previously. I am really liking it with autoconf,
where the configure option is named --enable-mpi, which is inherited to
subpacakges, and the variable set is <PKG>_ENABLE_MPI, which is clean.
In the long run, it seems that namespace cleanliness would win, so we will
go for the SC_ENABLE_* variables. Is there no way at all to have a short
CMake setting via "mpi", maybe with presets, on the command/configure line?
Pinging @scivision on comments about the -DSC_ENABLE_* approach.
Also pinging @jmark to be in the loop about upcoming sc changes.
|
Thank you for the quick response!
Without the changes of this PR, we obtained
Apparently the installation directory of zlib changed to a path outside of the build directory. |
We saw that when one is initially calling We tested also the code without the changes of this PR and copied the moved warnings to the same place as in this PR but the code still did not show the warning. |
After some further tinkering, we found a possible way. One could add
directly before the first appearance of |
Yes this is intentional. Hardcoding the install path into the CMakeLists.txt is a code smell. The install path is meant to be set on the command line as it depends on the target machine. Enforcing one breaks portability, composability with downstream software, and packaging tools such as CPack or Spack. In order to retrieve the old behavior you just need to specify it with a |
Very strange behavior. Maybe some cache issue... |
Yes this seems like a good tradeoff: existing code would continue working, but new downstream projects would not notice it. I can include it in the PR if this is ok for everyone |
@cburstedde @tim-griesbach Another solution to both of these problems could be to define a custom |
Wondering about the CI in that one instance... and thanks for adding the mpi and debug shortcuts. |
I finally managed to replicate the problem. I don't quite understand what was the root cause, but it should be fixed now! |
Thank you for the fix! I tried out your changes and it works for me as well. |
This may be resolved after the latest merge into develop. |
So close. What's going on on Windows now (unrelated?)? |
I think so:
|
Thanks; I'd think @scivision would know how to repair this. |
There was conflicting CMake variable use, fixed by this patch Note that CMAKE_BUILD_TYPE must be set before |
Thanks; when I keep using -Dmpi the error persists. The most recent code has the purpose to allow for -Dmpi on the cmake command line while using SC_ENABLE_MPI as the variable that is used in the cmake code. Is there a way to make this work with |
Ok I've integrated it all with the latest develop version. Sorry for the merge in between. It got a bit confusing, but at least we're current with everything. Would @dutkalex check whether this is all correct and I didn't screw up the merge? |
Looks good to me @cburstedde 😊 |
Welcome to the developer list. :) |
@dutkalex Can you please restore your branch, it seems one of your commits has broken the CI. |
@dutkalex Can you please restore your branch, it seems one of your commits has broken the CI.
It's a mix of disabling the OpenMPI support in Cmake and your code on the
SC_ variables. I might have overlooked something in merging. I do not know
what though -- do you think you can narrow it down (by bisect if need be)?
Sorry I cannot help until later next week, and thanks! Feel free to reopen.
|
No description provided.