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 - Use **CMAKE** `configure_file` macro instead of hand-crafted replacements This effects all files ending in `-HEPMCTEMPLATE` or `-HEPMC-TEMPLATE` - In case ROOT is enable, do not set `-std=c++X` - ROOT will supply that option - Sub-module `CMakeLists.txt` search 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 `configure_file`) - 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=medium` and 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) - Use set_property(SOURCE files APPEND PROPERTY COMPILER_DEFINITIONS ...) instead of setting `COMPILER_FLAGS` in a two step fashion. - Some other minor code fixes - `src/models.F` Preprocessor guard around `PHO_PHIST` expanded 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 `CHARACTER` array as `REAL`. Some things to consider for the future: - Perhaps EPOS should be treated like any other model - Perhaps define own transform from `HEPEVT` to `HepMC3::GenEvent` procdure so that the size of the `HEPEVT` common block can be directly defined here - ROOT output should really use the "standard" `TGenerator` output - that is, a `TClonesArray` of `TParticle` objects. Additional information can still be stored in the output tree (separate branches)
Showing
This diff is collapsed.
This diff is collapsed.