From c347ef0dab72359c06ea916581f55e8b72d8aa35 Mon Sep 17 00:00:00 2001 From: Scott Charlton Date: Thu, 12 Sep 2019 20:16:07 -0600 Subject: [PATCH] Modified to use adf instead of hdf5 --- unittest_cg_open_modify/CMakeLists.txt | 2 +- unittest_cg_open_read/CMakeLists.txt | 2 +- unittest_lock/CMakeLists.txt | 2 +- unittests_cgnsfile/CMakeLists.txt | 2 +- unittests_cgnsfile/case_sol_readwrite.cpp | 7 +++++++ unittests_cgnsfile/main.cpp | 9 +++++++++ 6 files changed, 20 insertions(+), 4 deletions(-) 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; }