https://github.com/ornl/ncio
No Cost Input Output data management framework
https://github.com/ornl/ncio
Last synced: about 2 months ago
JSON representation
No Cost Input Output data management framework
- Host: GitHub
- URL: https://github.com/ornl/ncio
- Owner: ORNL
- License: bsd-3-clause
- Created: 2020-05-08T11:16:47.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T01:25:21.000Z (almost 4 years ago)
- Last Synced: 2025-03-24T20:23:08.719Z (2 months ago)
- Language: C++
- Homepage:
- Size: 424 KB
- Stars: 2
- Watchers: 5
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/ORNL/ncio/actions)
[](https://codecov.io/gh/ORNL/ncio)# ncio
No Cost Input Output data management framework## Installing ncio from source with [Meson](https://mesonbuild.com/)
1. Requirements:
- meson build >= 0.52.0, from `pip3 install meson`
- ninja
- mono-complete (might be already installed on Ubuntu 18, 20, or macOS)
- pkg-config2. Build, Test, Install:
We highly recommend truly out-of-source builds (completely outside the repo directory).
```
$ mkdir ncio-build
$ cd ncio-build
$ meson --prefix=/path/to/install/ncio /path/to/repo/ncio
$ ninja
$ ninja test
$ ninja install
```
3. Code coverage from tests (requires gcov)Meson can generate code coverage reports automatically from tests.
Requires passing `-Db_coverage=true` when configuring and running the `coverage` target.
Reports would be generated under the `meson-logs` directory```
$ mkdir ncio-build
$ cd ncio-build
$ meson --prefix=/path/to/install/ncio -Db_coverage=true /path/to/repo/ncio
$ ninja
$ ninja coverage
[1/1] Generates coverage reports
lines: 45.8% (11 out of 24)
branches: 34.6% (9 out of 26)
Xml coverage report can be found at file:///Users/wfg/workspace/ncio-build/meson-logs/coverage.xml
Text coverage report can be found at file:///Users/wfg/workspace/ncio-build/meson-logs/coverage.txt
Html coverage report can be found at file:///Users/wfg/workspace/ncio-build/meson-logs/coveragereport/index.html
```## Linking ncio with CMake projects
Meson uses `pkg-config` as a standard packaging configuration method.
Make sure ncio installation directory is reachable, so pc configuration files can be found.
One of the methods is to pass `-DCMAKE_PREFIX_PATH=/installation/to/ncio` at configuration.
ncio can be easily be integrated with `CMake` projects via the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module.
The following snippet illustrates how to create a ncio target and link it to a `CMake` target.
```
# find pkg-config
find_package(PkgConfig REQUIRED)
# create target `PkgConfig::ncio`
pkg_check_modules(ncio REQUIRED IMPORTED_TARGET ncio)
# create a CMake target (_e.g._ executable)
add_executable(ncio_cmake ncio_cmake.cpp)
# link with PkgConfig::ncio target
target_link_libraries(ncio_cmake PUBLIC PkgConfig::ncio)
```
## Directory layout
* bindings - Public application programming interface, API, language bindings (C++17)* scripts - Project maintenance and development scripts
* source - Internal source code for private components and public common headers to be installed
* ncio - source directory for the ncio library to be installed as prefix/lib/libncio.** testing - Tests unit and functional using [doctest](https://github.com/onqtam/doctest)