C++ Datetime library
Introduction
ggdatetime is a C++ library to assist date and time - related computations in Geodesy related fields.
Compilation / Installation
Source code is ISO C++17. Compilation should be trivial using any C++ compiler
supporting the c++17
standard (option -std=c++17
in gcc and clang).
October 2021 Source code can also be compiled using the latest
C++ 20 standard. To compile against
C++20, set the corresponding flags in the Makefile.am
files.
Since December 2021, the build system has been changed from GNU Autotools to scons.
April 2022 Building with Autotools is now deprecated and not supported.
For the following, ROOTDIR
will be the root directory of this repository,
aka the directory under which /src
, /test
and /doc
folders live.
Compile and install
To compile and install, using scons, just type:
scons
sudo scons install
Verify & Test
After a succesefull installation, users should have:
- all library header files in
/usr/local/include/datetime/
- the library (both a static and shared) in
/usr/local/lib/
To run a validity check, just run: make check
at the root directory. Hopefully,
you 'll see all checks passing!
The following step is optional
A validation test script (kind of unit-testing) can be run to check that the library
works as expected. You do not need to have the library installed on your system to
perform the check (aka the step sudo make install
is not needed) you only need to
have it compiled (aka make
should be successeful). If you built the library in
a seperate folder you may need to edit the script, because it assumes that the
(newly compiled) library is located in ROOTDIR/src/.libs
witch is the default case.
The validation script can be found is make_unit_tests.sh
and to run it (assuming you are in ROOTDIR
):
cd var && bash make_unit_tests.sh
. The script will use a number of source files
located in the ROOT/var folder
to check the compile-ibility of the sources and the reported results. At the end
of the report, you should see the meesage: Everything appears to have worked as expected!
Link, include and have fun!
The Library
Namespaces
The whole of the library is wrapped around the dso
namespace
Linking
- static
- dynamic
Documentation & Library API (TODO)
- build dox with doxygen (or link to dox)
TODO
Bugs & Maintanance
Xanthos, xanthos@mail.ntua.gr Mitsos, danast@mail.ntua.gr