CMakeLists.txt 3.03 KB
Newer Older
1
2
3
4
################################################################################
# Package: JugBase
################################################################################

5
6
7
ROOT_GENERATE_DICTIONARY(G__JugBase
  JugBase/DataHandle.h
  LINKDEF JugBaseLinkDef.h
8
  OPTIONS -I${Gaudi_INCLUDE_DIR} -I${podio_INCLUDE_DIR}
9
)
10

11
gaudi_add_library(JugBase
12
13
14
15
16
17
  SOURCES
  src/ACTSLogger.cpp
  src/PodioDataSvc.cpp
  src/KeepDropSwitch.cpp
  src/Utilities/Helpers.cpp
  src/Utilities/Paths.cpp
18
  src/Plugins/DD4hepBField.cpp
19
  G__JugBase.cxx
20
21
  LINK
  Gaudi::GaudiKernel Gaudi::GaudiAlgLib
22
  podio::podioRootIO
23
24
  ROOT::Core ROOT::RIO ROOT::Tree
  DD4hep::DDG4IO DD4hep::DDRec
25
  ActsCore ActsPluginDD4hep
26
27
28
  ${genfit2}
)

29
30
31
32
add_custom_target(JugBase_ROOTDICTS DEPENDS G__JugBase.cxx )
add_dependencies(JugBase JugBase_ROOTDICTS)


33
34
target_include_directories(JugBase PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
35
36
37
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
  ${genfit2_INCLUDE_DIR}
)
38

Whitney Armstrong's avatar
Whitney Armstrong committed
39
target_compile_options(JugBase PRIVATE -Wno-suggest-override)
40

41
file(GLOB JugBasePlugins_sources src/components/*.cpp)
42
gaudi_add_module(JugBasePlugins
43
44
45
  SOURCES
  src/components/EICDataSvc.cpp
  src/components/GeoSvc.cpp
46
  src/components/ParticleSvc.cpp
47
48
49
50
51
52
53
54
55
56
57
  src/components/InputCopier.cpp
  src/components/MC2DummyParticle.cpp
  src/components/PodioInput.cpp
  src/components/PodioOutput.cpp
  src/components/ReadTestConsumer.cxx
  LINK
  Gaudi::GaudiKernel Gaudi::GaudiAlgLib
  ROOT::Core ROOT::RIO ROOT::Tree
  JugBase
  NPDet::DD4podIO
  DD4hep::DDRec
58
  ActsCore ActsPluginDD4hep ActsPluginJson
59
60
61
62
63
64
  EICD::eicd
  ${genfit2}
)

target_include_directories(JugBasePlugins PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
65
66
67
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
  ${genfit2_INCLUDE_DIR}
)
68

Whitney Armstrong's avatar
Whitney Armstrong committed
69
target_compile_options(JugBasePlugins PRIVATE -Wno-suggest-override)
70

71
72
73
74
75
76
install(TARGETS JugBase JugBasePlugins
  EXPORT JugBaseTargets
  RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin
  LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib
  COMPONENT dev)

77
78
79
80
81
82
83
install(
   FILES  
   ${CMAKE_CURRENT_BINARY_DIR}/libJugBase_rdict.pcm 
   ${CMAKE_CURRENT_BINARY_DIR}/libJugBase.rootmap
   DESTINATION lib )
 

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
if(BUILD_TESTING)
  enable_testing()
endif()

#add_test(NAME ProduceForReadTest
#         WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
#         COMMAND ${CMAKE_BINARY_DIR}/run ${PROJECT_SOURCE_DIR}/JugBase/scripts/gaudirun tests/options/simple_producer.py)
#add_test(NAME ReadTest
#         WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
#         COMMAND ${CMAKE_BINARY_DIR}/run ${PROJECT_SOURCE_DIR}/JugBase/scripts/gaudirun tests/options/simple_reader.py)
#add_test(NAME ReadGeoTest
#         WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
#         COMMAND ${CMAKE_BINARY_DIR}/run ${PROJECT_SOURCE_DIR}/JugBase/scripts/gaudirun tests/options/reader_with_geosvc.py)
#add_test(NAME CheckReadCollectionSize
#         ENVIRONMENT PYTHONPATH+=${PODIO_PYTHON_DIR}
#         WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
#         COMMAND python JugBase/tests/scripts/check_coll_after_read.py
#         DEPENDS ReadTest)