From 2b3ab2d4192a003a9cd262bc6a36d72ac365fbf4 Mon Sep 17 00:00:00 2001 From: ctraizet <cedric.traizet@c-s.fr> Date: Wed, 6 Mar 2019 14:00:05 +0100 Subject: [PATCH] COMP: added test on the SWIGPYTHON variable for other wrappers --- Modules/Wrappers/SWIG/src/otbApplication.i | 3 ++- Modules/Wrappers/SWIG/src/otbWrapperSWIGIncludes.h | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Modules/Wrappers/SWIG/src/otbApplication.i b/Modules/Wrappers/SWIG/src/otbApplication.i index 9dbab67cd2..449ca4cd8e 100644 --- a/Modules/Wrappers/SWIG/src/otbApplication.i +++ b/Modules/Wrappers/SWIG/src/otbApplication.i @@ -224,8 +224,9 @@ public: int Execute(); int ExecuteAndWriteOutput(); +#if SWIGPYTHON Logger* GetLogger(); - +#endif unsigned long itk::Object::AddObserver(const EventObject & event, Command * command); diff --git a/Modules/Wrappers/SWIG/src/otbWrapperSWIGIncludes.h b/Modules/Wrappers/SWIG/src/otbWrapperSWIGIncludes.h index bd694359e6..57dc59267a 100644 --- a/Modules/Wrappers/SWIG/src/otbWrapperSWIGIncludes.h +++ b/Modules/Wrappers/SWIG/src/otbWrapperSWIGIncludes.h @@ -26,10 +26,6 @@ #include "otbWrapperDocExampleStructure.h" #include "otbWrapperMetaDataHelper.h" -#include "otbPythonLogOutput.h" -#include "otbLogger.h" -#include "otbProgressReporterManager.h" - typedef otb::Wrapper::Application Application; typedef otb::Wrapper::Application::Pointer Application_Pointer; typedef otb::Wrapper::ApplicationRegistry Registry; @@ -43,6 +39,11 @@ typedef otb::Wrapper::ComplexInputImageParameter ComplexInputImageParame typedef otb::Wrapper::ImageBaseType ImageBaseType; +#if defined(SWIGPYTHON) +#include "otbPythonLogOutput.h" +#include "otbLogger.h" +#include "otbProgressReporterManager.h" + typedef otb::Logger Logger; typedef otb::Logger::Pointer Logger_Pointer; typedef otb::LogOutputCallback LogOutputCallback; @@ -50,5 +51,6 @@ typedef otb::PythonLogOutput PythonLogOutput; typedef otb::PythonLogOutput::Pointer PythonLogOutput_Pointer; typedef otb::ProgressReporterManager ProgressReporterManager; typedef otb::ProgressReporterManager::Pointer ProgressReporterManager_Pointer; +#endif #endif -- GitLab