diff --git a/unittest_cg_open_modify/CMakeLists.txt b/unittest_cg_open_modify/CMakeLists.txt index d85e82a..a3b3f5e 100644 --- a/unittest_cg_open_modify/CMakeLists.txt +++ b/unittest_cg_open_modify/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # library dependencies find_library(CGNS_LIBRARY cgns) -find_package(HDF5 NAMES hdf5) +##find_package(HDF5 NAMES hdf5) SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES}) diff --git a/unittest_cg_open_read/CMakeLists.txt b/unittest_cg_open_read/CMakeLists.txt index f8476ce..b3d3998 100644 --- a/unittest_cg_open_read/CMakeLists.txt +++ b/unittest_cg_open_read/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # library dependencies find_library(CGNS_LIBRARY cgns) -find_package(HDF5 NAMES hdf5) +##find_package(HDF5 NAMES hdf5) SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES}) diff --git a/unittest_lock/CMakeLists.txt b/unittest_lock/CMakeLists.txt index 083ec47..523938b 100644 --- a/unittest_lock/CMakeLists.txt +++ b/unittest_lock/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # library dependencies find_library(CGNS_LIBRARY cgns) -find_package(HDF5 NAMES hdf5) +##find_package(HDF5 NAMES hdf5) SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES}) diff --git a/unittests_cgnsfile/CMakeLists.txt b/unittests_cgnsfile/CMakeLists.txt index 8c0cd52..17c4df8 100644 --- a/unittests_cgnsfile/CMakeLists.txt +++ b/unittests_cgnsfile/CMakeLists.txt @@ -51,7 +51,7 @@ endif() # library dependencies find_library(CGNS_LIBRARY cgns) -find_package(HDF5 NAMES hdf5) +##find_package(HDF5 NAMES hdf5) SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES}) diff --git a/unittests_cgnsfile/case_sol_readwrite.cpp b/unittests_cgnsfile/case_sol_readwrite.cpp index d605658..175510e 100644 --- a/unittests_cgnsfile/case_sol_readwrite.cpp +++ b/unittests_cgnsfile/case_sol_readwrite.cpp @@ -2,12 +2,15 @@ #include "fs_copy.h" +#include // for CG_BUILD_HDF5 #include #include #include +#if (CG_BUILD_HDF5 != 0) #ifdef _MSC_VER #include #endif +#endif #include #include @@ -429,12 +432,14 @@ void case_SolWriteDivide(const std::string& origCgnsName) ier = cg_close(fid); VERIFY_LOG("cg_close() ier == 0", ier == 0); +#if (CG_BUILD_HDF5 != 0) #ifdef _MSC_VER if (hdf) { // this seems necessary when IRIC_OPTION_DIVIDESOLUTIONS is set on windows herr_t err = H5close(); VERIFY_LOG("H5close() ier == 0", err >= 0); } +#endif #endif VERIFY_REMOVE("case_soldivide.cgn", hdf); @@ -469,12 +474,14 @@ void case_SolWriteDivide(const std::string& origCgnsName) ier = cg_close(fid); VERIFY_LOG("cg_close() ier == 0", ier == 0); +#if (CG_BUILD_HDF5 != 0) #ifdef _MSC_VER if (hdf) { // this seems necessary when IRIC_OPTION_DIVIDESOLUTIONS is set on windows herr_t err = H5close(); VERIFY_LOG("H5close() ier == 0", err >= 0); } +#endif #endif VERIFY_REMOVE("case_soldivide3d.cgn", hdf); diff --git a/unittests_cgnsfile/main.cpp b/unittests_cgnsfile/main.cpp index 27fd2e7..232a45a 100644 --- a/unittests_cgnsfile/main.cpp +++ b/unittests_cgnsfile/main.cpp @@ -1,5 +1,6 @@ #include "cases.h" +#include // for CG_BUILD_HDF5 #include int main(int argc, char* argv[]) @@ -28,7 +29,9 @@ int main(int argc, char* argv[]) case_Complex(); case_GridRead(); +#if (CG_BUILD_HDF5 != 0) case_GridReadFunc(); +#endif case_GridWrite(); case_SolStartEnd(); @@ -36,16 +39,22 @@ int main(int argc, char* argv[]) case_SolWriteStd_adf(); case_SolWriteDivide_adf(); +#if (CG_BUILD_HDF5 != 0) case_SolWriteStd_hdf5(); case_SolWriteDivide_hdf5(); +#endif case_addGridAndResult(); case_read_adf(); +#if (CG_BUILD_HDF5 != 0) case_read_hdf5(); +#endif case_read_adf_no_results(); +#if (CG_BUILD_HDF5 != 0) case_read_hdf5_no_results(); +#endif return 0; }