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.
ESPResSo uses a
myconfig.hpp
containing preprocessor macros likeCUDA
,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 aCUDA
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.