Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /KFParticle/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
0002 
0003 project(KFParticleLibrary)
0004 
0005 macro(add_target_property _target _prop _value)
0006   get_target_property(_oldprop "${_target}" ${_prop})
0007   if(NOT _oldprop)
0008     set_target_properties("${_target}" PROPERTIES ${_prop} "${_value}")
0009   else(NOT _oldprop)
0010     set_target_properties("${_target}" PROPERTIES ${_prop} "${_oldprop} ${_value}")
0011   endif(NOT _oldprop)
0012 endmacro(add_target_property)
0013 
0014 if (CMAKE_VERSION VERSION_LESS "3.1")
0015 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
0016   set (CMAKE_CXX_FLAGS "--std=c++17 ${CMAKE_CXX_FLAGS}")
0017 endif ()
0018 else ()
0019   set (CMAKE_CXX_STANDARD 17)
0020 endif ()
0021 
0022 list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS} ${ROOTSYS})
0023 
0024 set(FIXTARGET FALSE CACHE BOOL "Compile for fix target geometry.")
0025 
0026 find_package(ROOT REQUIRED COMPONENTS Core Hist Matrix Physics EG Gpad Graf Graf3d RIO MathCore)
0027 If(DEFINED Vc_INCLUDE_DIR AND Vc_LIBRARIES)
0028   Message("Vc found")
0029 Else()
0030   find_package(Vc REQUIRED)
0031 EndIf()
0032 
0033 Set(INCLUDE_DIRECTORIES
0034   ${PROJECT_SOURCE_DIR}/KFParticle
0035   ${PROJECT_SOURCE_DIR}/KFParticlePerformance
0036 )
0037 
0038 include(${ROOT_USE_FILE})
0039 set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
0040 Include_Directories( ${CMAKE_SOURCE_DIR} ${Vc_INCLUDE_DIR} ${INCLUDE_DIRECTORIES} )
0041 set(CMAKE_INCLUDE_DIRECTORIES_BEFORE OFF)
0042 
0043 set(LINK_DIRECTORIES
0044   ${ROOT_LIBRARY_DIR}
0045 )
0046  
0047 link_directories( ${LINK_DIRECTORIES})
0048 
0049 set (SOURCES
0050   KFParticle/KFParticleTopoReconstructor.cxx
0051   KFParticle/KFVertex.cxx
0052   KFParticle/KFPTrack.cxx
0053   KFParticle/KFPTrackVector.cxx
0054   KFParticle/KFPVertex.cxx
0055   KFParticle/KFParticlePVReconstructor.cxx
0056   KFParticle/KFParticleDatabase.cxx
0057   KFParticle/KFParticleBase.cxx
0058   KFParticle/KFParticleBaseSIMD.cxx
0059   KFParticle/KFParticle.cxx
0060   KFParticle/KFParticleSIMD.cxx
0061   KFParticle/KFParticleFinder.cxx
0062   KFParticle/KFPEmcCluster.cxx
0063   KFParticlePerformance/KFMCVertex.cxx
0064   KFParticlePerformance/KFParticlePerformanceBase.cxx
0065   KFParticlePerformance/KFTopoPerformance.cxx
0066   KFParticlePerformance/KFMCParticle.cxx
0067   KFParticleTest/KFParticleTest.cxx
0068 )
0069 
0070 set (HEADERS
0071   KFParticle/KFParticleBase.h
0072   KFParticle/KFParticle.h
0073   KFParticle/KFVertex.h
0074   KFParticlePerformance/KFPartEfficiencies.h
0075   KFParticlePerformance/KFMCParticle.h
0076   KFParticleTest/KFParticleTest.h
0077 )
0078 
0079 if(FIXTARGET)
0080   ROOT_GENERATE_DICTIONARY(G__KFParticle ${HEADERS} LINKDEF KFLinkDef.h OPTIONS "-DDO_TPCCATRACKER_EFF_PERFORMANCE" "-DNonhomogeneousField" "-DCBM" "-DUSE_TIMERS")
0081   add_library(KFParticle SHARED ${SOURCES} G__KFParticle.cxx)
0082   target_link_libraries(KFParticle ${ROOT_LIBRARIES} ${Vc_LIBRARIES} )
0083   add_target_property(KFParticle COMPILE_FLAGS "-DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS")
0084 else(FIXTARGET)
0085   ROOT_GENERATE_DICTIONARY(G__KFParticle ${HEADERS} LINKDEF KFLinkDef.h OPTIONS "-inlineInputHeader" "-DDO_TPCCATRACKER_EFF_PERFORMANCE" "-DHomogeneousField" "-DUSE_TIMERS")
0086   add_library(KFParticle SHARED ${SOURCES} G__KFParticle.cxx)
0087   target_link_libraries(KFParticle ${ROOT_LIBRARIES} ${Vc_LIBRARIES} )
0088   add_target_property(KFParticle COMPILE_FLAGS "-DDO_TPCCATRACKER_EFF_PERFORMANCE -DHomogeneousField -DUSE_TIMERS")
0089 endif(FIXTARGET)
0090 
0091 if (ROOT_VERSION_MAJOR LESS 6)
0092     add_custom_target(libKFParticle.rootmap ALL DEPENDS KFParticle COMMAND rlibmap -o libKFParticle.rootmap -l libKFParticle.so -c ${PROJECT_SOURCE_DIR}/KFLinkDef.h)
0093 endif (ROOT_VERSION_MAJOR LESS 6)
0094 
0095 Set(NODICT_HEADERS
0096   KFParticle/KFParticleTopoReconstructor.h
0097   KFParticle/KFParticlePVReconstructor.h
0098   KFParticle/KFPVertex.h
0099   KFParticle/KFPTrack.h
0100   KFParticle/KFParticleFinder.h
0101   KFParticle/KFParticleSIMD.h
0102   KFParticle/KFParticleBaseSIMD.h
0103   KFParticle/KFParticleDef.h
0104   KFParticle/KFPSimdAllocator.h
0105   KFParticle/KFPTrackVector.h
0106   KFParticle/KFPEmcCluster.h
0107   KFParticle/KFParticleField.h
0108   KFParticle/KFPTrackVector.h
0109   KFParticle/KFParticleDatabase.h
0110   KFParticlePerformance/KFTopoPerformance.h
0111   KFParticlePerformance/KFParticlePerformanceBase.h
0112   KFParticlePerformance/KFMCCounter.h
0113   KFParticlePerformance/KFPVEfficiencies.h
0114   KFParticlePerformance/KFMCVertex.h
0115   KFParticlePerformance/KFMCTrack.h
0116   KFParticlePerformance/KFPartMatch.h
0117 )
0118 
0119 install(FILES ${HEADERS} ${NODICT_HEADERS} DESTINATION include)
0120 install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}KFParticle_rdict.pcm DESTINATION lib OPTIONAL)
0121 install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}KFParticle.rootmap DESTINATION lib)
0122 install(TARGETS KFParticle DESTINATION lib)