sly2j / nanocernlib

A minimal linux version of the old cernlib containing almost all cernlib routines.
5 stars 6 forks source link

Allow both parallel install with traditional cernlib AND drop-in replacement #2

Open wdconinc opened 3 years ago

wdconinc commented 3 years ago

Use case: A user of a Monte Carlo generator that depends on cernlib wants to use nanocernlib as a drop-in replacement for cernlib. Rather than rewriting the build system for the Monte Carlo generator (an old Makefile kludge), the user wants to just have nanocernlib look exactly like cernlib would look. This would cause it to work without any changes to the build system.

wdconinc commented 3 years ago

Currently all components have a CMakeLists.txt file that start with

################################################################################
## CMAKE Settings
################################################################################
set (LIBRARY "nanocernlib_mathlib")
set (TARGETS ${TARGETS} ${LIBRARY} PARENT_SCOPE)

whereas the cernlib libraries would need only matlib.

A suggested fix would allow the users of nanocernlib to specify cmake -DUSE_CERNLIB_LIB_NAMES=ON -B build -S . to use the same names as the cernlib libraries.