The following commands can be used to install the required and optional dependencies on your system.
apt install cmake \
doxygen \
liblog4cplus-dev
libboost-dev \
pacman -S cmake \
doxygen \
log4cplus \
gtest \
boost-libs
brew install cmake \
doxygen \
log4cplus \
boost \
-
Make a directory where the whole project will be, e.g.:
mkdir PROPOSAL
-
Create a build and src directory, e.g.:
mkdir PROPOSAL/src PROPOSAL/build
-
Extract the sources from the hompage or gitlab to the folder, e.g.:
unzip PROPOSAL.zip PROPOSAL/
or
git clone https://github.com/tudo-astroparticlephysics/PROPOSAL.git PROPOSAL/src
-
Move to the build directory and generate the Makefile with cmake:
cd PROPOSAL/build cmake ../src
If you don't want to compile the pybindings, call cmake with
cmake ../src -DADD_PYTHON=OFF
To specify an installation prefix other than
/usr/local
usecmake ../src -DCMAKE_INSTALL_PREFIX=/custom/prefix
The prefix is used to install PROPOSAL on your system (See item 6).
To show further installation options useccmake ../src
and/or visit the documentation. Also have a look at the additional cmake option down below.-
The option
CMAKE_INSTALL_PREFIX
adds the given path also to the include directories. So if you have installed PROPOSAL withCMAKE_INSTALL_PREFIX
and are modifying the header files, you will make sure to uninstall PROPOSAL before the next build otherwise your local changes won't be used. -
To ensure, that cmake finds the right python paths use these cmake options and adjust the version number to your python version:
-DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7
-
-
Compile the project:
make
or
make -j#
with
#
being the number of processors you can choose to compile the project on multiple processors simultaneously. -
Install the library on your system
make install
or for e.g.
make install DESTDIR=$HOME
The latter command will install PROPOSAL in
$HOME/<prefix>
, where theprefix
was defined byCMAKE_INSTALL_PREFIX
which defaults tousr/local
.
Option | Default value | Description |
---|---|---|
ADD_PYTHON |
ON | Compile the python wrapper |
ADD_PERFORMANCE_TEST |
OFF | Compile the performace test source |
ADD_ROOT |
ON | Compile PROPOSAL with ROOT support |
ADD_TESTS |
OFF | Compile unit tests. This downloads googletest. |
Examples
cmake -DADD_PYTHON=OFF <further options>
It is also possible to uninstall PROPOSAL with
make uninstall
This will remove all files listed in install_mainfest.txt
which should
have been created in your build directory after the installation.