Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netCDF_LIBRARIES name in Config file does not have namespace prefix #1607

Closed
raovgarimella opened this issue Jan 24, 2020 · 1 comment · Fixed by #1608
Closed

netCDF_LIBRARIES name in Config file does not have namespace prefix #1607

raovgarimella opened this issue Jan 24, 2020 · 1 comment · Fixed by #1608
Assignees

Comments

@raovgarimella
Copy link

Version netCDF 4.7.3
Ubuntu 18.04
CMake 3.14.5
gcc 9.1.0

netCDFConfig.cmake sets netCDF_LIBRARIES as netcdf like so:

set(netCDF_LIBRARIES netcdf)

but netCDFTargets.cmake sets the dependencies of target netCDF::netcdf like so:

add_library(netCDF::netcdf STATIC IMPORTED)

set_target_properties(netCDF::netcdf PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "/home/scratch/TPLs-0.97.1-gcc-9.1.0-ompi-3.1.4-aaa/lib/libhdf5_hl.a;/home/scratch/TPLs-0.97.1-gcc-9.1.0-ompi-3.1.4-aaa/lib/libhdf5.a;dl;/usr/lib/x86_64-linux-gnu/libm.so;/home/scratch/TPLs-0.97.1-gcc-9.1.0-ompi-3.1.4-aaa/lib/libz.a"
)

So if I set ${netCDF_LIBRARIES} as a dependency of a library I am building, it will not pick up the transitive dependencies (namely HDF5 libraries etc).

Fix - netCDFConfig.cmake should write out:
set(netCDF_LIBRARIES netCDF::netcdf)

@raovgarimella raovgarimella changed the title netcdf Target name in Config file does not have namespace prefix netCDF_LIBRARIES name in Config file does not have namespace prefix Jan 24, 2020
@WardF WardF self-assigned this Jan 24, 2020
@WardF
Copy link
Member

WardF commented Jan 24, 2020

Thanks! I'll take a look at updating this.

clrpackages pushed a commit to clearlinux-pkgs/netcdf that referenced this issue Apr 8, 2020
Ben Boeckel (1):
      windows: detect Windows using the correct define name

Dennis Heimbigner (20):
      Avoid spurious test failures when servers fail.
      Guard nctestserver.h against multiple inclusions
      Forgot to create pingurl4.c for Cmake
      Make the dap4 code resistant to various server errors.
      Add support for CURLOPT_CONNECTTIMEOUT
      Add support for multiple filters per variable.
      Fix conflicts with master
      fix memory leak
      force rebuild
      fix bad edit
      fix parallel filter error discovered by Hartnett
      Make utilities support NC_COMPACT
      Fix typo
      Fix Filters x compact
      fix references to var->deflate'
      fix memory allocation failure in hdf5var.c
      fix error in tst_h_vars.c
      Make scalar X filter return an error instead of ignoring it
      Fix open/create of UTF8 names
      Force error report when DAP gets error response.

Edward Hartnett (230):
      update of bm_file to prevent integer overflows on very big files
      improved docs for cache functions, added libhdf5/hdf5cache.c to Doxyfile.in, added benchmark program for cache settings
      updated users guide
      update release notes
      new cache default in cmake build
      took option out of configure.ac
      now always relax!
      changed cmake build to only allow relaxed coord builds
      removed non-relaxed coord bounds from test code
      took RELAX_COORD_BOUND out of libsrc code
      further removal of RELAX_COORD_BOUNDS macro
      further removal of RELAX_COORD_BOUND macro
      cleanup of RELAX_COORD_BOUND in cmake build
      removed last vestiges of RELAX_COORD_BOUND option, which is now always on
      added test for opening HDF5 file without creation ordering
      comment to explain
      moved udata.grps initialization to avoid memory problem on BAIL
      changed test filename to one that will be cleaned
      tests and fix for multiple unlimited dim bug
      more tests
      starting to support compact storage
      whitespace cleanup of test
      adding test for compact storage
      more test development
      more test development
      got compact storage test working
      got compact storage test working
      updated docs for NC_COMPACT
      further test development for compact storage
      more testing for compact vars
      more testing for compact vars
      more testing for compact vars
      better documentation for compact storage
      fixed comment
      better handling of var cache for parallel builds
      allow parallel writes to use zlib
      allowing parallel write of gzipped data, plus added test
      stop running tst_mode test
      adding another zlib parallel I/O test
      documentation updates
      now check that HDF5 version supports parallel zlib
      added new tests to cmake, also additional test development
      adjusted tst_parallel_zlib to HDF5 version flag
      adjusted tst_parallel_zlib2 to HDF5 version flag
      now also can set fletcher32 in parallel I/O writes
      swtich to collective access when filters are applied
      better documentation
      more documentaiton
      now prevent attempt to change to independent access when deflate, shuffle, or fletcher32 filters are in use
      even more documentation updates
      fixed include issue
      fixing for non-parallel builds
      getting parallel I/O with zlib working in cmake builds
      more testing
      more tests
      more testing
      more test development
      more test development
      changed name of macro
      restored tst_mode tests
      fixed comments
      fixed comments
      removed unneeded delete
      first stab at re-adding nc_def_var_szip()
      added test for when szip is missing from HDF5
      changed error code in nc_def_var_szip() to NC_EFILTER
      now checking for proper error from nc_def_var_szip() when szip is not present
      clean up
      whitespace clean up
      more szip tests
      more szip testing
      whitespace cleanup
      now using members in NC_VAR_INFO_T to hold szip info
      starting to add parallel tests
      parallel szip test
      parallel szip test
      parallel szip test
      parallel szip test
      checking sziped data in parallel I/O test
      fixed deflate_level comment
      added SZIP to libnetcdf.settings.in
      moved nc_def_var_szip  prototype to netcdf_filter.h
      fixed doc formatting issue
      added to libnetcdf.settings and netcdf_meta.h
      adding NC_HAS_SZIP_WRITE and NC_HAS_PAR_FILTERS to cmake build
      fixing running of parallel filter tests only when parallel filters are present
      fixed shell test for par filters
      start using par filters in HDF5-1.10.3
      move AM_CONDITIONAL outside if-statement body
      switch cmake build to check for func H5Dread_chunk to detect 1.10.3 or later
      fixed compile error
      updated RELEASE_NOTES to include results of recent PR merges
      fixed distclean target in dap4_test
      configure now confirms that HDF5 was built with zlib
      detecting lack of zlib in cmake build
      moved cmake detection of lack of zlib to be with other HDF5 stuff
      fixed cmake check for zlib in HDF5 library
      fixed libnetcdf.settings output in cmake build wrt szip
      more HDF5 tests for szip functionality
      testing nc_def_var_szip when szip has not been built into HDF5
      more tests
      more documentation for nc_inq_var_szip
      fix problem with pre-enddef call to nc_inq_var_szip()
      now remember szip setting in filter fields
      test nc_inq_var_szip after call to nc_def_var_szip, but before enddef
      use nc_def_var_filter in nc_def_var_szip
      rely completely on nc_def_var_filter for setting szip
      adding szip test to tst_parallel_zlib2.c
      more of szip test in tst_parallel_zlib2.c
      now parallel szip test working in tst_parallel_zlib2.c
      moved tst_parallel_zlib2 to tst_parallel_compress
      not return 0 for parameters to nc_inq_var_szip if szip is not turned on for var
      renamed var for clarity
      turned on some previously failing tests for nc_inq_var_szip()
      documentation improvements for nc_inq_var_szip()
      fixed call to AC_SUBST inside an if-endif in configure.ac
      fix error in makefile building tst_parallel_compress.c
      removed unnecessary library check for szip library, cleaned up comments
      adding test for zlib+szip in HDF5
      finished test for zlib+szip in HDF5
      removed redundant test
      removed unneeded var
      disallow szip if zlib already in use
      disallow zlib if szip already in use
      updated documentation
      starting to add test for szip param values
      adding test of different szip option mask settings
      test development for different szip option mask settings
      checking for some bad pixels_per_block values for szip
      now check number of elements in chunk against pixels_per_block for szip compression
      test more values for szip
      test more values for szip
      fixed docs, removed unneeded defines in test
      move nc_def_var_szip function so it will appear in the documentation
      updated release notes
      trying to fix windows build
      whitespace and comment cleanup
      uncommented part of test code
      moving run_par_tests.sh to run_par_tests.sh.in
      now allow substitution of different mpi launcher in h5_test/run_par_tests.sh
      cleanup of nc_test4/run_par_test.sh.in
      added HDF5 parallel test to CMake build
      now causing cmake build to create h5_test/run_par_tests.sh from h5_test/run_par_tests.sh.in
      updated RELEASE_NOTES
      more uncommented test code and whitespace cleanup
      raised NC_MAX_HDF4_NAME length to NC_MAX_NAME
      updated release notes
      adding tst_mem1.c
      now detect memory leak open/closing files with tst_mem1.c
      further development of mem testing program
      turned down number of runs
      fix for memory leak due to HDF5 types
      only close non-zero typeids
      edited release notes
      added version to dispatch table
      whitespace cleanup
      better documentation
      now check the dispatch table version number
      whitespace cleanup of tst_udf.c
      now test that bad version number in dispatch table causes rejection
      now test that bad version number in dispatch table causes rejection
      changed version of dispatch table to 2 in configure.ac
      updated release notes
      added more documentation to nc_def_var_filter()
      added in decl for num_obj for large file builds
      whitespace cleanup
      making room for new tests
      adding test
      adding test
      testing two unlimited dims
      testing two unlimited dims
      testing two unlimited dims
      testing two unlimited dims
      adding 3d test
      adding 3d test
      better 3d unlimited testing
      added another var to 2D test
      improving 3d test
      checking 2nd var data in 3D test
      switched to vara functions in 3D test
      checking 3D file again after close
      more checking in 3D test
      added some testing for compact vars
      updated documentation of nc_inq_var_chunking()
      adding more test for compact var
      whitespace cleanup of tst_h_vars2.c
      refurbishing old test that was commented out
      fixed warnings
      fixed comments
      test demonstrating HDF5 use of compact scalar dataset
      more tests for compact storage
      more tests for storage, changed var names to reflect stortage
      include storage in rec_print_metadata() output
      more HDF5 testing of scalar compact variable
      all tests passing but compact storage for scalars not being properly written in file yet
      changed metadata logging to reflect unknown storage if var metadata has not yet be read
      fixed problem with scalar compact
      updated docs on nc_def_var_chunking to describe behavior of scalars
      fixed large file build issue
      fixed warning
      fixed szip test error in tst_parallel5.c
      documentation improvements for nc_var_par_access()
      updated docs for nc_def_var_chunking WRT scalars
      updated release notes
      more documentation for NC_VAR_INFO_T in nc4internal.h
      fixed tst_mode to not attempt to set filters on scalars
      now return NC_EINVAL on attempt to set chunking on scalar var
      clarified release notes
      updated documentation
      removed commented-out code
      added storage to NC_VAR_INFO_T, removed unneeded test code
      starting to use storage field when opening file
      now setting storage field when setting var storage
      using storage in hdf5filter.c
      using storage field in nc4var.c
      continuing to switch to storage field
      more use of storage field
      now using storage everywhere
      stop setting contiguous/compact fields at file open
      stop setting contiguous field in hdf5filter.c
      stop setting contiguous field in nc4hdf5.c
      fixed HDF4 use of contiguous
      less use of contiguous/compact field
      final removal of fields contiguous/compact from NC_VAR_INFO_T
      whitespace cleanup
      updated release notes
      change to trigger CI
      now pass 0 for deflate_level if deflate not in use
      updated documentation of nc_inq_var_deflate() to describe behavior of deflate_level when deflate not in use
      fixed documentation of cache int functions

Greg Sjaardema (2):
      Add missing ERR macro on tests
      Better finding of the hdf5.h include path

James Sharpe (1):
      Call find_package(MPI) to locate MPI paths and link to libdispatch if required

Jennifer Oxelson (1):
      changed/removed references to jetstream remotetest instance.

M. Scot Breitenfeld (1):
      Updated H5Oget_info* and H5Oinfo_t to be compatible with HDF5 1.12.0.

Magnus Ulimoen (1):
      add file to .gitignore

Ward Fisher (44):
      Updated one of the static software pages.
      Started to rough in ctest-based scripts.
      Started to rough in ctest-based scripts.
      Added project name to ctest_basic ctest script.
      Refactoring ctest script.
      Added script for mpicc Experimental builds.  Renamed serial Experimental script to reflect that fact.
      Correct a cmake linking error discovered when working in a mips qemu environment.
      Correct a typo.
      Cleaned up an 'uninitialized variable' issue reported by static analysis. Minor fix, rolling in to this PR rather than spinning up a separate one.
      Fixing the typo I introduced when fixing the typo.
      Disable byterange tests if DAP remote tests are disabled.
      Turned off hdf4 explicitly when no NetCDF-4 support is available.
      Added namespace prefix to netCDF_LIBRARIES in CMake in support of Unidata/netcdf-c#1607
      Cleaned up szlib status message in libnetcdf.settings.
      Correct typo.
      Tweaked configure.ac
      Removed deprecated functions from doxygen template file
      Initial copy of files into NUG directory.
      Some initial reorganization.
      Shuffling NUG and documentation.
      Moved tag files into the subsequent html directory.
      Removed obsolete tags.
      Modified doxygen to look at URL instead of local files.
      Removed old guide.md file.
      Moved NUG related files in to NUG directory.
      Corrected tag for szip write support output in libnetcdf.settings.in
      Cleaning up distcheck.
      Added a ctest script with DAP tests enabled.
      Adding test in support of https://github.com/Unidata/netcdf-c/pulls/1668
      Syntax fix
      Added cleanup to test script.
      Typo in Makefile.am
      Permissions error on unicode directory test script.
      Fix typo for distcheck.
      Updated release notes in support of Unidata/netcdf-c#1666, Unidata/netcdf-c#1668 and Unidata/netcdf-c#1669
      Updated expected release date.
      Updated so version info in line with guidelines found at https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
      Updated soversion, bump to next development version in preparation of upstream merge back into master from 4.7.4 wellspring.
      Modified version numbers to reflect 4.7.4 release.
      Added maintainer mode for general distribution.
      Added autoconf generated files for a stand-alone release.
      Added generated files for a stand-alone release.
      Updated Release Notes.
      Pedantically bumped release date, rolling v4.7.4 release now.

edwardhartnett (4):
      added rest of unit tests to cmake build
      trying unit tests on windows
      turned off unit tests for windows
      turned off cmake build in travis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants