Mega patch to modernise build system
OK, so here's a number of changes - mainly to build system - to make it easier to use CRMC shared libraries in third party applications.
The changes are
configure_filemacro instead of hand-crafted replacements This effects all files ending in
In case ROOT is enable, do not set
-std=c++X- ROOT will supply that option
CMakeLists.txtsearch for files not only in current source directory but also current binary directory. This is needed for out-of-source builds (don't eat where you ... - you get the idea) so that CMAKE can find the generated files (from
Enforce that only one DPMJet model version can be built
Enforce, in case of static linking, that PhoJet and DPMJet cannot be built together
In case of static linking, check if both C++ and Fortran compilers support the flag
-mcmodel=mediumand if so, pass that flag. This is needed - otherwise we might get the error
relocation truncated to fit: R_X86_64_32S against symbol ...
from GCC (and I think other compilers too)
set_property(SOURCE files APPEND PROPERTY COMPILER_DEFINITIONS ...)
instead of setting
COMPILER_FLAGSin a two step fashion.
Some other minor code fixes
src/models.FPreprocessor guard around
PHO_PHISTexpanded to take into account if PhoJet is being built
src/dpmjet/3.2019-1/DPMJET-19.1/src/phojet/PHO_SETPCOMB.f- fix bug. Trying to format a
Some things to consider for the future:
- Perhaps EPOS should be treated like any other model
- Perhaps define own transform from
HepMC3::GenEventprocdure so that the size of the
HEPEVTcommon block can be directly defined here
- ROOT output should really use the "standard"
TGeneratoroutput - that is, a
TParticleobjects. Additional information can still be stored in the output tree (separate branches)