Problem 2050 - CLHEP variables Geant4Config.cmake
Summary: CLHEP variables Geant4Config.cmake
Status: RESOLVED WONTFIX
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 10.4
Hardware: All All
: P4 major
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2018-04-04 15:34 CEST by Marko Petric
Modified: 2018-05-08 14:28 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Marko Petric 2018-04-04 15:34:21 CEST
Hi,
there seem to be a inconsistency how CLHEP is treated in different versions and this causes dependent software problems.

1. In lib64/Geant4-10.2.3/Geant4Config.cmake it's defined
    set(CLHEP_ROOT_DIR "__path_to_CLHEP__")
    find_package(CLHEP 2.3.1.1 REQUIRED )

   which also defines CLHEP_INCLUDE_DIRS


2. In lib64/Geant4-10.3.3/Geant4Config.cmake it's defined
    set(CLHEP_ROOT_DIR "__path_to_CLHEP__")
    find_package(CLHEP 2.3.4.3 REQUIRED )

   which also defines CLHEP_INCLUDE_DIRS

3. In lib64/Geant4-10.4.0/Geant4Config.cmake CLHEP_ROOT_DIR disappears and you only have 
    set(CLHEP_DIR "__path_to_CLHEP__/lib/CLHEP-2.4.0.0") which points to lib
    find_package(CLHEP 2.4.0.0 EXACT REQUIRED  CONFIG)

    which also defines CLHEP_INCLUDE_DIRS


We(DD4hep) usually used CLHEP_ROOT_DIR but this is not possible since 10.4, now we infer the location of CLHEP from the CLHEP_INCLUDE_DIRS. 

Was this intentional?

Cheers,
Marko
Comment 1 Ben Morgan 2018-05-08 14:28:25 CEST
This is due to the change from using our own "FindCLHEP" module to the use of CLHEP's provided "CLHEPConfig.cmake" file. The later is now, and will be, the way in which CLHEP is located and configured. 

CLHEP_ROOT_DIR won't be supported going forward and it's not a standard variable, and may not be reliable in all cases (it's highly dependent on how the client packaged/installed CLHEP).