netcdf-c/libncpoco
Dennis Heimbigner 69ed78e7d7 Convert the ENABLE_XXX options to NETCDF_ENABLE_XXX options
# Primary Change
In order to conform to the cmake overhaul, occurrences of
ENABLE_XXX options in the nczarr code have been changed to
NETCDF_ENABLE_XXX.

# Misc. Other changes
* Fix use of rand_s in libdispatch/ncrandom.c
* Fix some bugs in the mingw gitub action.
* Fix signature bug in libncpoco/cp_win32.c
* Make some NCZarr fixes to config.h.cmake.in
2024-05-11 16:23:40 -06:00
..
CMakeLists.txt CMake: Enable plugins on MinGW 2024-05-01 11:02:04 +01:00
COPYRIGHT chore: unset executable flag 2023-08-23 13:31:42 +09:00
cp_test.c chore: unset executable flag 2023-08-23 13:31:42 +09:00
cp_unix.c Merge pull request #2745 from e-kwsm/chmod-x 2023-12-11 17:28:46 -07:00
cp_win32.c Convert the ENABLE_XXX options to NETCDF_ENABLE_XXX options 2024-05-11 16:23:40 -06:00
cptestlib.c chore: unset executable flag 2023-08-23 13:31:42 +09:00
Makefile.am chore: unset executable flag 2023-08-23 13:31:42 +09:00
ncpoco.c Merge pull request #2745 from e-kwsm/chmod-x 2023-12-11 17:28:46 -07:00
ncpoco.h Merge pull request #2745 from e-kwsm/chmod-x 2023-12-11 17:28:46 -07:00
README.md
SourceLicence

The cpoco Multi-Platform Dynamic-Loading Library

Description

The primary goal of the cpoco project is to provide a C language version of the poco multi-platform dynamic loading library. The poco libraries are written in C++.

The secondary goal of cpoco is to support dynamic loading of HDF5 filters by the netCDF C library.

Mutual Exclusion Support

Internally, cpoco (like poco) supports serialized access to the dynamic loading functions using mutual exclusion locks. For nix systems, this usually requires pthreads support.

In any case, it is possible to disable the use of mutual exclusion if you know you are operating in a single threaded environment: see the installation section below.

Implementataion Restrictions

Currently support is provided for the following systems.

  • libdl supporting operating systems: e.g. linux, os-x, cygwin.
  • Windows-32 api

Installation

Automake

Automake-based configuration is provided using ./configure is provided for systems supporting autoconf/automake.

Use this command to see the available options.

./configure --help

The most important options are these.

  • --disable-mutex -- disable using mutual exclusion (default is enabled)
  • --disable-pthread -- disable using pthreads (default is enabled if operating system provides it)
  • --enable-shared -- build a shared library (default is enabled)
  • --enable-static -- build a static library (default is enabled)
  • --prefix= -- defaults to /usr/local

Note that is --enable-shared is disabled, then the test program will not run because the test shared library (libcpt) cannot be built.

Use these commands to build, test, and install using autoconf.

# Invoke configure
./configure <options>
make all
# If testing is desired
make check
# Optional
make install

The are those shown by ./configure --help.

CMake

Cmake-based configuration is provided provided for systems supporting it. If building for windows, then this is the only option provided.

Use these commands to build using cmake.

# Create a build directory
rm -fr build
mkdir build
cd build
# Invoke cmake
cmake <flags> ..
cmake --build .
# If testing is desired
CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test
# Optional
cmake --build . --target install

The are these:

  • -DENABLE_MUTEX -- use mutual exclusion (default is true)
  • -DENABLE_PTHREAD -- use pthreads (if available) (default is true)
  • -DCMAKE_INSTALL_PREFIX= -- installation directory (defaults to /usr/local or c:/Program Files)

Support

Author: Dennis Heimbigner
Organization: University Corporation for Atmospheric Research
Initial Release: 2015-9-28 Last Modified: 2018-03-27

Copyright: Copyright 2018, UCAR/Unidata; see COPYRIGHT file for copying and redistribution conditions. This code is Derived from the poco library (See Poco Information below).

Change Log

  1. (2016-09-28) Initial release.
  2. (2018-03-27) Updated to make fix some automake problems.

Poco Information

Poco License

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.