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

Add prefix to preprocessor macros #4974

Open
jngrad opened this issue Aug 9, 2024 · 0 comments
Open

Add prefix to preprocessor macros #4974

jngrad opened this issue Aug 9, 2024 · 0 comments
Assignees
Labels

Comments

@jngrad
Copy link
Member

jngrad commented Aug 9, 2024

ESPResSo uses a myconfig.hpp containing preprocessor macros like CUDA, P3M, MASS, FFTW. These macros prevent us from using similarly named classes and enum values. For a concrete example, when including header files from PyTorch, which define a CUDA enum value, we can only compile ESPResSo by introducing #undef CUDA.

We need to add an ESPRESSO_ prefix to all our preprocessor macros. This is the solution used by Boost and waLBerla.

This change will break all existing myconfig files, unless we can figure out a way to post-process the myconfig file in Python, like we do with external features, which are preprocessor macros generated by CMake and post-processed by Python.

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

No branches or pull requests

2 participants