Back to home page

EIC code displayed by LXR

 
 

    


Warning, /jana2/src/examples/RootDatamodelExample/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 
0002 if(${USE_ROOT})
0003         find_package(ROOT REQUIRED)
0004 
0005         # Generate ROOT dictionaries for each of our ROOT object types
0006     # The foreach statement below should end with a list of classes
0007     # that dictionaries should be created from. Headers for each class
0008     # will be determined by adding a ".h" suffix to them. The dictionary
0009     # PCM filenames will also be derived from this so they can be
0010     # installed in the proper directory.
0011     # n.b. it would be great if we could install the *.pcm files with
0012     # a GLOB, but they do not exist when cmake is run so we have to guess
0013     # the names.
0014         include_directories(${CMAKE_CURRENT_SOURCE_DIR})
0015     set(my_pcms)
0016     foreach( CLASS Hit Cluster )
0017         ROOT_GENERATE_DICTIONARY(G__${CLASS} ${CLASS}.h)
0018         list(APPEND my_pcms ${CMAKE_CURRENT_BINARY_DIR}/lib${CLASS}_rdict.pcm )
0019     endforeach()
0020 
0021     set (RootDatamodelExample_HEADERS
0022         Hit.h 
0023         Cluster.h 
0024         JFactory_Cluster.h
0025                 JTestRootEventSource.h
0026                 JTestRootProcessor.h)
0027 
0028     set (RootDatamodelExample_SOURCES
0029         RootDatamodelExample.cc
0030         JTestRootEventSource.cc
0031         JFactory_Cluster.cc
0032         JTestRootProcessor.cc
0033         G__Hit.cxx
0034         G__Cluster.cxx)
0035 
0036     add_jana_plugin(RootDatamodelExample 
0037         SOURCES ${RootDatamodelExample_SOURCES}
0038         PUBLIC_HEADER ${RootDatamodelExample_HEADERS})
0039 
0040     target_include_directories(RootDatamodelExample PUBLIC ${ROOT_INCLUDE_DIRS})
0041     target_link_libraries(RootDatamodelExample PUBLIC ${ROOT_LIBRARIES})
0042 
0043     message(STATUS "Installing ROOT PCM files: ${my_pcms}")
0044     install(FILES ${my_pcms} DESTINATION lib/JANA/plugins)
0045 
0046     add_test(NAME jana-example-rootdatamodel-tests
0047         COMMAND jana -Pplugins=RootDatamodelExample -Pjana:nevents=10)
0048         
0049     set_tests_properties(jana-example-rootdatamodel-tests
0050         PROPERTIES DISABLED TRUE)
0051 
0052 else()
0053     message(STATUS "Skipping plugins/RootDatamodelExample because USE_ROOT=Off")
0054 
0055 endif() # ROOT_FOUND