Commit b28b9c5b authored by Ben Boeckel's avatar Ben Boeckel
Browse files

vtkIOXdmf2: update to the new module system

parent 49fa05f5
set(Module_SRCS set(classes
vtkSILBuilder.cxx vtkSILBuilder
vtkXdmfDataArray.cxx vtkXdmfDataArray
vtkXdmfHeavyData.cxx vtkXdmfHeavyData
vtkXdmfReader.cxx vtkXdmfReader
vtkXdmfReaderInternal.cxx vtkXdmfReaderInternal
vtkXdmfWriter.cxx vtkXdmfWriter)
)
#set(${vtk-module}_NO_HeaderTest 1) # TODO: helper classes and re-enable vtk_module_add_module(VTK::IOXdmf2
vtk_module_library(vtkIOXdmf2 ${Module_SRCS}) CLASSES ${classes})
ExternalData_Expand_Arguments(VTKData _ vtk_module_test_data(
"DATA{${VTK_TEST_INPUT_DIR}/XDMF/,REGEX:.*}" Data/XDMF/,REGEX:.*)
)
vtk_add_test_cxx(vtkIOXdmf2CxxTests tests vtk_add_test_cxx(vtkIOXdmf2CxxTests tests
TestTemporalXdmfReaderWriter.cxx,NO_VALID TestTemporalXdmfReaderWriter.cxx,NO_VALID
......
...@@ -251,53 +251,6 @@ int XdmfTestVTKIO (int ac, char *av[]) ...@@ -251,53 +251,6 @@ int XdmfTestVTKIO (int ac, char *av[])
return VTK_ERROR; return VTK_ERROR;
} }
#if 0
if (!vtkTestUtilities::GetDataRoot(ac,av))
{
cerr << "NO DATA ROOT" << endl;
return 0;
}
//TEST SET 3
char* fname =
vtkTestUtilities::ExpandDataFileName(
ac, av, "Data/RectGrid2.vtk");
if (DoFilesExist(fname, nullptr, false))
{
vtkDataSetReader *dsr = vtkDataSetReader::New();
dsr->SetFileName(fname);
dsr->Update();
fail = TestXDMFConversion(dsr->GetOutput(), "xdmfIOtest_DSR_1");
dsr->Delete();
delete[] fname;
if (fail)
{
cerr << "Failed DataSetReader Test 1" << endl;
return VTK_ERROR;
}
dsr = vtkDataSetReader::New();
fname =
vtkTestUtilities::ExpandDataFileName(
ac, av, "Data/uGridEx.vtk");
dsr->SetFileName(fname);
dsr->Update();
fail = TestXDMFConversion(dsr->GetOutput(), "xdmfIOtest_DSR_2");
dsr->Delete();
delete[] fname;
if (fail)
{
cerr << "Failed DataSetReader Test 2" << endl;
return VTK_ERROR;
}
}
else
{
delete[] fname;
}
#endif
//ETC. //ETC.
return 0; return 0;
} }
vtk_module(vtkIOXdmf2
GROUPS
TEST_DEPENDS
vtkFiltersGeneral
vtkTestingCore
KIT
vtkIO
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkIOLegacy
PRIVATE_DEPENDS
vtkFiltersExtraction
vtkIOXMLParser
vtksys
vtkxdmf2
)
NAME
VTK::IOXdmf2
LIBRARY_NAME
vtkIOXdmf2
KIT
VTK::IO
DEPENDS
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonExecutionModel
VTK::IOLegacy
PRIVATE_DEPENDS
VTK::FiltersExtraction
VTK::IOXMLParser
VTK::libxml2
VTK::vtksys
VTK::xdmf2
TEST_DEPENDS
VTK::FiltersGeneral
VTK::TestingCore
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include "vtkShortArray.h" #include "vtkShortArray.h"
#include "vtkUnsignedShortArray.h" #include "vtkUnsignedShortArray.h"
#include <XdmfArray.h> #include "vtk_xdmf2.h"
#include VTKXDMF2_HEADER(XdmfArray.h)
using namespace xdmf2; using namespace xdmf2;
......
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
#include <deque> #include <deque>
#include <cassert> #include <cassert>
#include <libxml/tree.h> #include "vtk_libxml2.h"
#include VTKLIBXML2_HEADER(tree.h)
#ifdef VTK_USE_64BIT_IDS #ifdef VTK_USE_64BIT_IDS
typedef XdmfInt64 vtkXdmfIdType; typedef XdmfInt64 vtkXdmfIdType;
......
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
#ifndef __VTK_WRAP__ #ifndef __VTK_WRAP__
#ifndef VTK_WRAPPING_CXX #ifndef VTK_WRAPPING_CXX
#include "XdmfDataItem.h" #include "vtk_xdmf2.h"
#include "XdmfGrid.h" //won't compile without it #include VTKXDMF2_HEADER(XdmfDataItem.h)
#include VTKXDMF2_HEADER(XdmfGrid.h) //won't compile without it
#include "vtkIOXdmf2Module.h" // For export macro #include "vtkIOXdmf2Module.h" // For export macro
class vtkAlgorithm; class vtkAlgorithm;
......
...@@ -34,22 +34,23 @@ ...@@ -34,22 +34,23 @@
#include "vtkMutableDirectedGraph.h" #include "vtkMutableDirectedGraph.h"
#include "vtkSILBuilder.h" #include "vtkSILBuilder.h"
#include "XdmfArray.h" #include "vtk_xdmf2.h"
#include "XdmfAttribute.h" #include VTKXDMF2_HEADER(XdmfArray.h)
#include "XdmfDOM.h" #include VTKXDMF2_HEADER(XdmfAttribute.h)
#include VTKXDMF2_HEADER(XdmfDOM.h)
//? //?
#include "XdmfDataDesc.h" #include VTKXDMF2_HEADER(XdmfDataDesc.h)
//? //?
#include "XdmfDataItem.h" #include VTKXDMF2_HEADER(XdmfDataItem.h)
#include "XdmfGrid.h" #include VTKXDMF2_HEADER(XdmfGrid.h)
//? //?
#include "XdmfTopology.h" #include VTKXDMF2_HEADER(XdmfTopology.h)
//? //?
#include "XdmfGeometry.h" #include VTKXDMF2_HEADER(XdmfGeometry.h)
//? //?
#include "XdmfTime.h" #include VTKXDMF2_HEADER(XdmfTime.h)
//? //?
#include "XdmfSet.h" #include VTKXDMF2_HEADER(XdmfSet.h)
#include <string> #include <string>
#include <vector> #include <vector>
......
...@@ -43,16 +43,17 @@ ...@@ -43,16 +43,17 @@
#include "vtkUnstructuredGrid.h" #include "vtkUnstructuredGrid.h"
#include "vtksys/SystemTools.hxx" #include "vtksys/SystemTools.hxx"
#include "XdmfArray.h" #include "vtk_xdmf2.h"
#include "XdmfAttribute.h" #include VTKXDMF2_HEADER(XdmfArray.h)
#include "XdmfDataDesc.h" #include VTKXDMF2_HEADER(XdmfAttribute.h)
#include "XdmfDOM.h" #include VTKXDMF2_HEADER(XdmfDataDesc.h)
#include "XdmfDomain.h" #include VTKXDMF2_HEADER(XdmfDOM.h)
#include "XdmfGeometry.h" #include VTKXDMF2_HEADER(XdmfDomain.h)
#include "XdmfGrid.h" #include VTKXDMF2_HEADER(XdmfGeometry.h)
#include "XdmfRoot.h" #include VTKXDMF2_HEADER(XdmfGrid.h)
#include "XdmfTime.h" #include VTKXDMF2_HEADER(XdmfRoot.h)
#include "XdmfTopology.h" #include VTKXDMF2_HEADER(XdmfTime.h)
#include VTKXDMF2_HEADER(XdmfTopology.h)
#include <algorithm> #include <algorithm>
#include <map> #include <map>
...@@ -60,7 +61,8 @@ ...@@ -60,7 +61,8 @@
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <libxml/tree.h> // always after std::blah stuff #include "vtk_libxml2.h"
#include VTKLIBXML2_HEADER(tree.h) // always after std::blah stuff
#ifdef VTK_USE_64BIT_IDS #ifdef VTK_USE_64BIT_IDS
typedef XdmfInt64 vtkXdmfIdType; typedef XdmfInt64 vtkXdmfIdType;
......
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