Name CMake variables consistently#1744
Conversation
|
As the upcoming xSDK version 1.0.0 is currently tested with precice@develop, we should prepare an update for the precice Spack package before merging this. |
I also don't have any good idea on how to handle this. Does it toggle a feature, or choose between two different dependencies? |
It toggles more of a developer feature, which enables the generation of stacktraces (otherwise the stacktraces are just masked and unusable). |
|
More on a side-note: do we also keep the default for all |
As long as the user receives a clear message "PETSc not found - Set |
|
I like the new format. The feature prefix really makes them easier to detect in ccmake too.
Autodetection is a huge pain as your entire system leaks into your builds, making them non-reproducible. I already ran into this with some other projects. Explicit options and hard errors are the way to go. CMake has some support for this, but it is super confusing from the developer and user perspective.
Some TODOs:
I have a spack branch ready now. So, its not blocking a merge. |
I don't see any update requirements in the |
|
Oops right. So it's just a question what to do with the libbacktrace now. |
Yes, for me, libbacktrace fits more into the category of developer features and not into our
Once we agreed here, I would merge this PR, as I understand that a corresponding spack patch is ready. |
The
This is the option I like the most, even though I would find it hard to argue that it is only a feature for developers of preCICE. I could imagine that people use stacktraces when debugging their codes, which use preCICE. But no real objection here.
I thought that the package generation was really that we prepare the configuration for the package generation. The |
I mean we can also go for |
Sounds consistent, I guess let's do that. |
Main changes of this PR
Names our CMake variables consistently and cleans-up some cmake variables, which are currently not marked as advanced. Current suggestions/renamings:
PRECICE_PETScMapping->PRECICE_FEATURE_PETSC_MAPPINGPRECICE_MPICommunication->PRECICE_FEATURE_MPI_COMMUNICATIONPRECICE_Packages->PRECICE_CONFIGURE_PACKAGE_GENERATIONPRECICE_PythonActions->PRECICE_FEATURE_PYTHON_ACTIONSPRECICE_ENABLE_C->PRECICE_BINDINGS_CPRECICE_ENABLE_FORTRAN->PRECICE_BINDINGS_FORTRANPRECICE_ENABLE_LIBBACKTRACE->PRECICE_FEATURE_LIBBACKTRACE_STACKTRACESAll remaining variables remain unchanged. As discussed in #1516 the naming scheme is supposed to follow the convention
PRECICE_FEATURE, i.e.,<PREFIX>_<DEPENDENCY>_<FEATURE>. The only violation I can spot right now isPRECICE_ENABLE_LIBBACKTRACE, or should we go forPRECICE_LIBBACKTRACE_STACKTRACES?Motivation and additional information
See #1516 and closes #1516
Author's checklist
pre-commithook to prevent dirty commits and usedpre-commit run --allto format old commits.make changelogif there are user-observable changes since the last release.Reviewers' checklist