C++ Utility Library
LGPL-2.1 License
This dual-licensed library provides a set of classes that complement C++ and boost with functionality needed by many applications.
The library is free to use under LGPLv2 license for non-commercial projects, and has a commercial open source license for commercial use (contact the author for commercial licensing details).
The components include:
$ git clone [email protected]:saleyn/utxx.git
The utxx
library requires:
python*-lxml.x86_64
package)The bootstraping process searches for python3
and if found uses that
version. Otherwise it searches for python2
. If you have both versions
and would like to use python2
, set WITH_PYTHON2=1
environment
variable before running make bootstrap
or add it to the .cmake-args
.
To customize location of BOOST or installation prefix, create a file called
.cmake-args.${HOSTNAME}
. Alternatively if you are doing multi-host build with
identical configuration, create a file call .cmake-args
. E.g.:
There are three sets of variables present in this file:
Build and install locations.
DIR:BUILD=...
- Build directoryDIR:INSTALL=...
- Install directoryThey may contain macros:
@PROJECT@
- name of current project (from CMakeList.txt)@VERSION@
- project version number (from CMakeList.txt)@BUILD@
- build type (from command line)${...}
- environment variableENV:VAR=...
- Environment var set before running cmake
VAR=...
- Variable passed to cmake with -D prefix
Example:
$ cat > .cmake-args.${HOSTNAME}
DIR:BUILD=/tmp/@PROJECT@/build
DIR:INSTALL=/opt/pkt/@PROJECT@/@VERSION@
ENV:BOOST_ROOT=/opt/pkg/boost/current
ENV:BOOST_LIBRARYDIR=/opt/pkg/boost/current/gcc/lib
PKG_ROOT_DIR=/opt/pkg
Run:
$ make bootstrap [toolchain=gcc|clang] [build=Debug|Release] \
[generator=make|ninja] [prefix=/usr/local] [verbose=true]
$ make [verbose=true]
$ make install # Default install path is /usr/local
If you are doing a release install, the install process installs two
versions of the library: libutxx_d.so
(debug) and libutxx.so
(release).
To install release build you need to run the following steps:
$ make bootstrap toolchain=gcc build=debug
$ make src/libutxx_d.so src/libutxx_d.a # build debug versions of the library
$ make rebootstrap build=release
$ make # build release versions
$ make install
After running make bootstrap
two local links are created build
and inst
pointing to build and installation directories.
If you need to do a full cleanup of the current build and rerun bootstrap with previously chosen options, do:
$ make distclean
$ make rebootstrap [toolchain=gcc|clang] [build=Debug|Release]
Note that the rebootstrap
command remembers previous bootstrap options, but
if you give it arguments they will override the old ones.
The following news group was set up for commit notifications:
github-utxx at googlegroups dot com
Structure your commit message like this:
Fix bug 123
Add 'foobar' command
Change default timeout to 123
ts=4:sw=4:et
)"// vim:ts=4:sw=4:et"
at the beginning of each fileif (...) {
...
} else {
...
}
class my_class { int this_my_fun(); };
)int my_fun(int a_count)
)class test { int m_count; };
)class test { static const int s_ok = 1; };
)<saleyn at gmail dot com>