From 0cf9c554d977680a7faea8448f107b892b80fb71 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 15 Mar 2024 11:16:50 -0500 Subject: [PATCH 1/5] removing things I didn't mean to commit --- CMakeLists.txt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c7eac9c30..ad273d7450 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1541,15 +1541,6 @@ foreach(_LIB ${ALL_TLL_LIBS}) list(APPEND LINKFLAGS "-L${_LIB_DIR}") endforeach() -#set(NC_LIBS "-lnetcdf ${NC_LIBS}") -if(NC_LIBS) - string(REPLACE ";" " " NC_LIBS "${NC_LIBS}") - string(REPLACE "-lhdf5::hdf5-shared" "-lhdf5" NC_LIBS ${NC_LIBS}) - string(REPLACE "-lhdf5::hdf5_hl-shared" "-lhdf5_hl" NC_LIBS ${NC_LIBS}) - string(REPLACE "-lhdf5::hdf5-static" "-lhdf5" NC_LIBS ${NC_LIBS}) - string(REPLACE "-lhdf5::hdf5_hl-static" "-lhdf5_hl" NC_LIBS ${NC_LIBS}) -endif() - string(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}") list(REMOVE_DUPLICATES NC_LIBS) From adc82f5d1dbb3c64fe746a06a63d5c35dca10d73 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Tue, 19 Mar 2024 09:36:54 -0500 Subject: [PATCH 2/5] replacing something that removes semicolons --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad273d7450..7ceff8286f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1541,6 +1541,10 @@ foreach(_LIB ${ALL_TLL_LIBS}) list(APPEND LINKFLAGS "-L${_LIB_DIR}") endforeach() +if(NC_LIBS) + string(REPLACE ";" " " NC_LIBS "${NC_LIBS}") +endif() + string(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}") list(REMOVE_DUPLICATES NC_LIBS) From 057f716d7f066c1f3e05da18a619d8d67314683c Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 19 Mar 2024 11:19:57 -0600 Subject: [PATCH 3/5] Updated the nc-config script with the following: o Added --build-system to report whether netcdf was configured using cmake or autotools. o For cmake-based installs, added an argument which will allow non-cmake projects to get traditionally formated dependancy syntax, --libs-ac-syntax. --- nc-config.cmake.in | 34 ++++++++++++++++++++++++++-------- nc-config.in | 6 +++++- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/nc-config.cmake.in b/nc-config.cmake.in index 15ea967d4c..bbcacbf885 100644 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -166,13 +166,15 @@ Available values for OPTION include: --has-stdfilters lists the standard filters enabled --has-benchmarks whether benchmarks enabled - --libs library linking information for netcdf - --static library linking information for statically-compiled netcdf - --prefix Install prefix - --includedir Include directory - --libdir Library directory - --plugindir Plugin directory - --version Library version + --libs library linking information for netcdf + --libs-ac-syntax forces autotools-compatible syntax argument for libraries + --static library linking information for statically-compiled netcdf + --prefix Install prefix + --includedir Include directory + --libdir Library directory + --plugindir Plugin directory + --version Library version + --build-system Build System EOF @@ -216,6 +218,7 @@ all() echo " --libdir -> $libdir" echo " --plugindir -> $plugindir" echo " --version -> $version" + echo " --build-system -> cmake" echo } @@ -251,6 +254,10 @@ while test $# -gt 0; do --all) all ;; + + --build-system) + echo "cmake" + ;; --cc) echo $cc @@ -347,7 +354,18 @@ while test $# -gt 0; do echo $libs fi ;; - + --libs-ac-syntax) + libs=$(echo $libs | sed 's/hdf5::hdf5_hl/hdf5_hl/g') + libs=$(echo $libs | sed 's/HDF5::HDF5/hdf5/g') + libsprivate=$(echo $libsprivate | sed 's/hdf5::hdf5_hl/hdf5_hl/g') + libsprivate=$(echo $libsprivate | sed 's/HDF5::HDF5/hdf5/g') + if [ "x$HAS_STATIC" = "xTRUE" ]; then + echo $libs $libsprivate + else + echo $libs + fi + + ;; --static) ;; diff --git a/nc-config.in b/nc-config.in index a229e7776e..8288d27edc 100644 --- a/nc-config.in +++ b/nc-config.in @@ -80,6 +80,7 @@ Available values for OPTION include: --libdir Library directory --plugindir Plugin directory --version Library version + --build-system Build System EOF @@ -120,6 +121,7 @@ all() echo " --libdir -> $libdir" echo " --plugindir -> $plugindir" echo " --version -> $version" + echo " --build-system -> autotools" echo } @@ -156,7 +158,9 @@ while test $# -gt 0; do --all) all ;; - + --build-system) + echo "autotools" + ;; --cc) echo $cc ;; From a56cfe038fcfddf1b353901c44e18fa004867080 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 19 Mar 2024 11:25:09 -0600 Subject: [PATCH 4/5] No effect other than to remove a personal annoyance I introduced in the first place. --- nc-config.cmake.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nc-config.cmake.in b/nc-config.cmake.in index bbcacbf885..c1d97a99b8 100644 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -355,11 +355,13 @@ while test $# -gt 0; do fi ;; --libs-ac-syntax) + libs=$(echo $libs | sed 's/hdf5::hdf5_hl/hdf5_hl/g') libs=$(echo $libs | sed 's/HDF5::HDF5/hdf5/g') - libsprivate=$(echo $libsprivate | sed 's/hdf5::hdf5_hl/hdf5_hl/g') - libsprivate=$(echo $libsprivate | sed 's/HDF5::HDF5/hdf5/g') + if [ "x$HAS_STATIC" = "xTRUE" ]; then + libsprivate=$(echo $libsprivate | sed 's/hdf5::hdf5_hl/hdf5_hl/g') + libsprivate=$(echo $libsprivate | sed 's/HDF5::HDF5/hdf5/g') echo $libs $libsprivate else echo $libs From c38cfc5d7cea315ae7f6cc73f07feb6d0db47d97 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 19 Mar 2024 11:37:40 -0600 Subject: [PATCH 5/5] Remove dangling define in netcdf_meta.h template file. --- include/netcdf_meta.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/netcdf_meta.h.in b/include/netcdf_meta.h.in index eda9081d51..c3e45a063c 100644 --- a/include/netcdf_meta.h.in +++ b/include/netcdf_meta.h.in @@ -61,7 +61,7 @@ #define NC_DISPATCH_VERSION @NC_DISPATCH_VERSION@ /*!< Dispatch table version. */ #define NC_HAS_PAR_FILTERS @NC_HAS_PAR_FILTERS@ /* Parallel I/O with filter support. */ #define NC_HAS_LOGGING @NC_HAS_LOGGING@ /*!< Logging support. */ -#define NC_HAS_MULTIFILTERS @NC_HAS_MULTIFILTERS@ /*!< Nczarr support. */ + #define NC_HAS_QUANTIZE @NC_HAS_QUANTIZE@ /*!< Quantization support. */ #define NC_HAS_ZSTD @NC_HAS_ZSTD@ /*!< Zstd support. */ #define NC_HAS_BENCHMARKS @NC_HAS_BENCHMARKS@ /*!< Benchmarks. */