Fixing issues building with HDF5 and without Silo/NetCDF

This commit is contained in:
Mark Berrill 2021-11-03 11:05:50 -04:00
parent e424312579
commit 8a8df8fbb0
5 changed files with 12 additions and 10 deletions

View File

@ -149,6 +149,7 @@ ENDIF()
IF ( NOT ONLY_BUILD_DOCS )
CONFIGURE_MPI() # MPI must be before other libraries
CONFIGURE_MIC()
CONFIGURE_HDF5()
CONFIGURE_NETCDF()
CONFIGURE_SILO()
CONFIGURE_LBPM()

View File

@ -274,7 +274,7 @@ std::vector<IO::MeshDatabase> writeMeshesHDF5( const std::vector<IO::MeshDataStr
std::vector<IO::MeshDatabase> writeMeshesHDF5(
const std::vector<IO::MeshDataStruct> &, const std::string &, IO::FileFormat, int );
const std::vector<IO::MeshDataStruct> &, const std::string &, IO::FileFormat, int )
{
return std::vector<IO::MeshDatabase>();
}

View File

@ -245,7 +245,9 @@ std::vector<IO::MeshDatabase> writeMeshesSilo(
{
return std::vector<IO::MeshDatabase>();
}
void writeSiloSummary( const std::vector<IO::MeshDatabase> &, const std::string & );
void writeSiloSummary( const std::vector<IO::MeshDatabase> &, const std::string & )
{
}
#endif

View File

@ -6,9 +6,6 @@
struct LBPM_Point {
LBPM_Point() : x(0.0), y(0.0), z(0.0) {}
LBPM_Point(double xv,double yv,double zv) : x(xv), y(yv), z(zv) {}
LBPM_Point(const LBPM_Point& rhs): x(rhs.x), y(rhs.y), z(rhs.z) {}
//Point& operator=(const Point& rhs) { this->x=rhs.x; this->y=rhs.y; this->z=rhs.z; return *this; }
//~Point() {}
double x,y,z;
};
typedef LBPM_Point Point;

View File

@ -103,12 +103,12 @@ ENDMACRO()
# Macro to find and configure hdf5
MACRO ( CONFIGURE_HDF5 )
CHECK_ENABLE_FLAG( USE_HDF5 0 )
IF ( USE_HDF5 )
# Check if we specified the silo directory
IF ( USE_HDF5 AND NOT FOUND_HDF5 )
# Check if we specified the hdf5 directory
IF ( HDF5_DIRECTORY )
VERIFY_PATH ( ${HDF5_DIRECTORY} )
INCLUDE_DIRECTORIES ( ${HDF5_DIRECTORY}/include )
SET ( HDF5_INCLUDE ${HDF5_DIRECTORY}/include )
SET( HDF5_INCLUDE ${HDF5_DIRECTORY}/include )
FIND_LIBRARY ( HDF5_LIB NAMES hdf5 PATHS ${HDF5_DIRECTORY}/lib NO_DEFAULT_PATH )
FIND_LIBRARY ( HDF5_HL_LIB NAMES hdf5_hl PATHS ${HDF5_DIRECTORY}/lib NO_DEFAULT_PATH )
ELSE()
@ -118,6 +118,8 @@ MACRO ( CONFIGURE_HDF5 )
${HDF5_HL_LIB}
${HDF5_LIB}
)
SET( FOUND_HDF5 TRUE )
SET( EXTERNAL_LIBS ${HDF5_LIBS} ${EXTERNAL_LIBS} )
ADD_DEFINITIONS ( -DUSE_HDF5 )
MESSAGE( "Using hdf5" )
MESSAGE( " ${HDF5_LIB}" )
@ -151,7 +153,7 @@ MACRO( CONFIGURE_NETCDF )
ELSE()
MESSAGE( FATAL_ERROR "Default search for netcdf is not yet supported. Use -D NETCDF_DIRECTORY=" )
ENDIF()
SET( EXTERNAL_LIBS ${NETCDF_LIBS} ${HDF5_LIBS} ${EXTERNAL_LIBS} )
SET( EXTERNAL_LIBS ${NETCDF_LIBS} ${EXTERNAL_LIBS} )
ADD_DEFINITIONS ( -DUSE_NETCDF )
MESSAGE( "Using netcdf" )
MESSAGE( " ${NETCDF_LIBS}" )
@ -179,7 +181,7 @@ MACRO ( CONFIGURE_SILO )
SET ( SILO_LIBS
${SILO_LIB}
)
SET( EXTERNAL_LIBS ${SILO_LIBS} ${HDF5_LIBS} ${EXTERNAL_LIBS} )
SET( EXTERNAL_LIBS ${SILO_LIBS} ${EXTERNAL_LIBS} )
ADD_DEFINITIONS ( -DUSE_SILO )
MESSAGE( "Using silo" )
MESSAGE( " ${SILO_LIB}" )