Commit 5f6979af authored by Andrew Burns's avatar Andrew Burns

Merge branch 'master' into 'master'

Fixes to python wrappers for python wrappers when TIFF isn't available

Some changes to the XdmfCore.i file to prevent undefined errors on systems without TIFF headers.

See merge request !23
parents fb210b8c aff6b1fa
......@@ -160,6 +160,9 @@ if(XDMF_WRAP_PYTHON)
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -DXDMF_BUILD_DSM_THREADS)
endif ()
endif ()
if (TIFF_FOUND)
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -DXDMF_BUILD_TIFF)
endif ()
set_source_files_properties(${python_name}.i PROPERTIES CPLUSPLUS ON)
set(swig_extra_generated_files "")
swig_add_module(${python_name}Python python ${python_name}.i)
......
......@@ -3,6 +3,7 @@ XdmfCorePython.cpp:
swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
*/
#ifdef XDMF_BUILD_TIFF
%module XdmfCore
%{
......@@ -33,6 +34,38 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
#include <ProjectVersion.hpp>
%}
#else
%module XdmfCore
%{
#include <XdmfArray.hpp>
#include <XdmfArrayReference.hpp>
#include <XdmfArrayType.hpp>
#include <XdmfCore.hpp>
#include <XdmfCoreItemFactory.hpp>
#include <XdmfCoreReader.hpp>
#include <XdmfError.hpp>
#include <XdmfFunction.hpp>
#include <XdmfHeavyDataController.hpp>
#include <XdmfHeavyDataWriter.hpp>
#include <XdmfHDF5Controller.hpp>
#include <XdmfHDF5Writer.hpp>
#include <XdmfInformation.hpp>
#include <XdmfItem.hpp>
#include <XdmfItemProperty.hpp>
#include <XdmfSharedPtr.hpp>
#include <XdmfSparseMatrix.hpp>
#include <XdmfSubset.hpp>
#include <XdmfSystemUtils.hpp>
#include <XdmfVersion.hpp>
#include <XdmfVisitor.hpp>
#include <XdmfWriter.hpp>
#include <ProjectVersion.hpp>
%}
#endif
// Ignoring C Wrappers
// XdmfItem
......@@ -1263,7 +1296,9 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
%shared_ptr(XdmfItemProperty)
%shared_ptr(XdmfSparseMatrix)
%shared_ptr(XdmfSubset)
%shared_ptr(XdmfTIFFController)
#ifdef XDMF_BUILD_TIFF
%shared_ptr(XdmfTIFFController)
#endif
%shared_ptr(XdmfVisitor)
%shared_ptr(XdmfWriter)
......@@ -1292,7 +1327,9 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
%include XdmfInformation.hpp
%include XdmfHDF5Controller.hpp
%include XdmfHDF5Writer.hpp
%include XdmfTIFFController.hpp
#ifdef XDMF_BUILD_TIFF
%include XdmfTIFFController.hpp
#endif
%include XdmfWriter.hpp
%include CMake/VersionSuite/ProjectVersion.hpp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment