From 2f97947e20d26518162657cc51894f455faf1174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Fri, 17 Nov 2023 11:15:06 +0100 Subject: [PATCH] Guard against non-ADIOS2 compilation --- include/openPMD/IO/ADIOS/ADIOS2File.hpp | 9 +++++---- src/IO/ADIOS/ADIOS2File.cpp | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/openPMD/IO/ADIOS/ADIOS2File.hpp b/include/openPMD/IO/ADIOS/ADIOS2File.hpp index 12474e23a5..e5d866d42b 100644 --- a/include/openPMD/IO/ADIOS/ADIOS2File.hpp +++ b/include/openPMD/IO/ADIOS/ADIOS2File.hpp @@ -23,10 +23,6 @@ #include "openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp" #include "openPMD/IO/AbstractIOHandler.hpp" #include "openPMD/IO/IOTask.hpp" - -#include -#include - #include "openPMD/IO/InvalidatableFile.hpp" #include "openPMD/config.hpp" @@ -37,11 +33,15 @@ #include #endif +#include +#include + namespace openPMD { class ADIOS2IOHandlerImpl; } +#if openPMD_HAVE_ADIOS2 namespace openPMD::detail { class BufferedActions; @@ -492,3 +492,4 @@ void BufferedActions::flush(Args &&...args) } } } // namespace openPMD::detail +#endif diff --git a/src/IO/ADIOS/ADIOS2File.cpp b/src/IO/ADIOS/ADIOS2File.cpp index 458c56472a..e0874276a7 100644 --- a/src/IO/ADIOS/ADIOS2File.cpp +++ b/src/IO/ADIOS/ADIOS2File.cpp @@ -43,6 +43,7 @@ throw std::runtime_error((TEXT)); \ } +#if openPMD_HAVE_ADIOS2 namespace openPMD::detail { template @@ -1314,5 +1315,5 @@ void BufferedActions::markActive(Writable *writable) break; } } - } // namespace openPMD::detail +#endif