-
Notifications
You must be signed in to change notification settings - Fork 34
Compile From Source
If looking for old instructions for 0.7.0 version or older,
follow the old instructions.
rifiuti2
switched over to CMake since 0.8.0.
$ tar -Jxf rifiuti2-0.8.0-Source.tar.xz # or do git checkout
$ cmake -S rifiuti2-0.8.0 -B _build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
$ cmake --build _build
$ cd _build && ctest -T test --progress; cd ..
$ cmake --install _build --prefix <somewhere> # for packagers
-
cmake
≥ 3.17 -
ninja
(good oldmake
should work too ifcmake
is not usingNinja
generator, but not rigorously tested) -
glib
≥ 2.40 (deveopment headers and libraries) -
pkgconf
(some Linux might only have the obsoletepkg-config
) - C compiler — both
gcc
andclang
are tested - (Solaris only)
iconv/extra
package - (optional)
xmllint
utility fromlibxml2
is used for some tests
Only MSYS2 is supported; rifiuti2
doesn't build with
Visual Studio yet. It is easiest to install all requirements with
following command, once you obtain a MSYS2 shell of
desired environment:
$ pacboy -S toolchain:p glib2:p cmake:p libxml2:p
Distributed Windows binaries are built under MINGW32
and UCRT64
MSYS2 environments.
-
Extract source archive, or use a
git
checkout folder directly if you are feeling brave. -
Configure step: out-of-tree build is the standard recommanded practice for
cmake
. The TL;DR procedure on top of document uses folder named_build
outside source tree to place all built content. Various config can be changed in this step.- Say if one wants to use non-default compiler (default is
cc
found in path), add-D CMAKE_C_COMPILER=/path/to/compiler
- Default build type is
RelWithDebInfo
. One can change it to-D CMAKE_BUILD_TYPE=Debug
for a debug build, for example.
- Say if one wants to use non-default compiler (default is
-
Build step:
cmake --build _build
creates all executables under_build
folder. The programs are now ready for use. -
Test step: though not strictly necessary, it is recommended to perform this step to ensure safety. Note that
ctest
must be executed inside build folder.
rifiuti2
can be used immediately without installing.
If compile or test step fails, please report problem, describing your OS and compile environment, and attach relevant testsuite log file(s) if needed.