From 3a89af446928e35a987043d95e37a048ccfc9564 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 12 Dec 2023 21:52:45 -0500 Subject: [PATCH] silence preprocessor warning from leaking internal define in cython generated code --- src/PYTHON/python_impl.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 6dd5175621..c1c26c7bb3 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -29,19 +29,31 @@ #ifdef MLIAP_PYTHON #include "mliap_model_python.h" +#if defined(__PYX_EXTERN_C) && !defined(CYTHON_EXTERN_C) +#undef __PYX_EXTERN_C +#endif #include "mliap_unified.h" // The above should somehow really be included in the next file. // We could get around this with cython --capi-reexport-cincludes // However, that exposes -too many- headers. #include "mliap_model_python_couple.h" +#if defined(__PYX_EXTERN_C) && !defined(CYTHON_EXTERN_C) +#undef __PYX_EXTERN_C +#endif #include "mliap_unified_couple.h" #ifdef LMP_KOKKOS #include "mliap_model_python_kokkos.h" +#if defined(__PYX_EXTERN_C) && !defined(CYTHON_EXTERN_C) +#undef __PYX_EXTERN_C +#endif #include "mliap_unified_kokkos.h" // The above should somehow really be included in the next file. // We could get around this with cython --capi-reexport-cincludes // However, that exposes -too many- headers. #include "mliap_model_python_couple_kokkos.h" +#if defined(__PYX_EXTERN_C) && !defined(CYTHON_EXTERN_C) +#undef __PYX_EXTERN_C +#endif #include "mliap_unified_couple_kokkos.h"