From c57e33ec65b16501ca06e41f19a7a4c5a87af0c3 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Mon, 17 Oct 2022 12:59:46 +0200 Subject: [PATCH] [App] Conditionally compile embedded Python module --- Applications/CLI/ogs_embedded_python.cpp | 2 ++ Applications/CLI/ogs_embedded_python.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Applications/CLI/ogs_embedded_python.cpp b/Applications/CLI/ogs_embedded_python.cpp index 21ae3c9d726..a76c3a9fdbf 100644 --- a/Applications/CLI/ogs_embedded_python.cpp +++ b/Applications/CLI/ogs_embedded_python.cpp @@ -7,6 +7,7 @@ * */ +#ifdef OGS_EMBED_PYTHON_INTERPRETER #include "ogs_embedded_python.h" #include <pybind11/embed.h> @@ -59,3 +60,4 @@ pybind11::scoped_interpreter setupEmbeddedPython() } } // namespace ApplicationsLib +#endif diff --git a/Applications/CLI/ogs_embedded_python.h b/Applications/CLI/ogs_embedded_python.h index 7a6a192eceb..b9c6d37c9bd 100644 --- a/Applications/CLI/ogs_embedded_python.h +++ b/Applications/CLI/ogs_embedded_python.h @@ -9,6 +9,8 @@ #pragma once +#ifdef OGS_EMBED_PYTHON_INTERPRETER + #include <pybind11/embed.h> #include "BaseLib/ExportSymbol.h" @@ -19,3 +21,5 @@ namespace ApplicationsLib OGS_EXPORT_SYMBOL pybind11::scoped_interpreter setupEmbeddedPython(); } // namespace ApplicationsLib + +#endif -- GitLab