CMakeLists.txt 3.61 KB
Newer Older
1
###############################################################################
2
# (c) Copyright 2000-2021 CERN for the benefit of the LHCb Collaboration      #
3
4
5
6
7
8
9
10
#                                                                             #
# This software is distributed under the terms of the GNU General Public      #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
#                                                                             #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization  #
# or submit itself to any jurisdiction.                                       #
###############################################################################
11
12
13
14
#[=======================================================================[.rst:
MooreCache
----------
#]=======================================================================]
15
16
17
18

# Import the cache creation module
include(LoKiFunctorsCache)

19
20
21
22
23
24
25
26
set(cache_deps
    LHCb::LoKiCoreLib
    LHCb::PhysEvent
    Rec::FunctorCoreLib  # this should bring most dependencies indirectly
    Phys::ParticleCombinersLib
    # TODO can we get this list automatically?
    # TODO can we depend only on the headers and not the .so files?
)
27
28
29

if(TARGET MergeConfDB2)
    list(APPEND cache_deps MergeConfDB2)
30
31
endif()

32
# Disable LoKi-specific hacks in LoKiFunctorsCachePostActionOpts.py
33
set(LOKI_FUNCTORS_CACHE_POST_ACTION_OPTS)
34

35
list(APPEND hlt1_settings hlt1_pp_default hlt1_pp_comparison)
36
list(APPEND hlt2_settings options/hlt2_pp_default options/hlt2_pp_thor tests/options/thor/loki_comparison tests/options/hlt2_reco_plus_thor_selections)
37

38
if(NOT DEFINED REC_ROOT_DIR)
39
40
41
    # Rec uses new CMake configuration so we need a different way to locate
    # private files
    set(REC_ROOT_DIR ${Rec_DIR}/../../../../..)
42
43
endif()

44
foreach(name IN LISTS hlt1_settings)
45
46
47
48
49
50
51
52
53
54
55
56
57
    loki_functors_cache(Moore_FunctorCache_Hlt1_${name}
            ${REC_ROOT_DIR}/Phys/FunctorCache/options/DisableLoKiCacheFunctors.py
            ${PROJECT_SOURCE_DIR}/Hlt/Moore/tests/options/default_input_and_conds_hlt1.py
            ${CMAKE_CURRENT_SOURCE_DIR}/options/process_zero_events.py
            ${CMAKE_CURRENT_SOURCE_DIR}/options/silence_application_manager.py
            ${PROJECT_SOURCE_DIR}/Hlt/Hlt1Conf/options/${name}.py
        FACTORIES FunctorFactory
        LINK_LIBRARIES
            Gaudi::GaudiKernel
            Rec::FunctorCoreLib
        DEPENDS ${cache_deps}
        SPLIT 15
    )
58
endforeach()
59

60
foreach(options_path IN LISTS hlt2_settings)
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    # Replace forward slashes with underscores to form a valid CMake identifier
    string(REPLACE "/" "_" name ${options_path})
    loki_functors_cache(Moore_FunctorCache_Hlt2_${name}
            ${REC_ROOT_DIR}/Phys/FunctorCache/options/DisableLoKiCacheFunctors.py
            ${PROJECT_SOURCE_DIR}/Hlt/Moore/tests/options/default_input_and_conds_hlt2.py
            ${CMAKE_CURRENT_SOURCE_DIR}/options/process_zero_events.py
            ${CMAKE_CURRENT_SOURCE_DIR}/options/silence_application_manager.py
            ${PROJECT_SOURCE_DIR}/Hlt/Hlt2Conf/${options_path}.py
        FACTORIES
            FunctorFactory
            TrackFunctorFactory
            HybridFactory
            PPFactoryHybridFactory
            HltFactory
        LINK_LIBRARIES
            Gaudi::GaudiKernel
            LHCb::LoKiCoreLib
            LHCb::LoKiHltLib
            Phys::DaVinciKernelLib
            Phys::LoKiArrayFunctorsLib
            Phys::LoKiPhysLib
            Rec::FunctorCoreLib
            Rec::LoKiTrackLib
        DEPENDS ${cache_deps}
85
        SPLIT 25
86
    )
87
endforeach()