Skip to content

Commit

Permalink
GeneratorParam (#6)
Browse files Browse the repository at this point in the history
* GeneratorParam ported from AliRoot

* Copyright notice added

* cleanup

* format corrections
  • Loading branch information
amorsch authored Nov 10, 2020
1 parent f0879f2 commit be69648
Show file tree
Hide file tree
Showing 12 changed files with 7,775 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ add_subdirectory(TEPEMGEN)

add_subdirectory(GeneratorCosmics)

add_subdirectory(GeneratorParam)

if (DEFINED ENV{HIJING_ROOT})
add_subdirectory(THijing)
endif (DEFINED ENV{HIJING_ROOT})
Expand Down
45 changes: 45 additions & 0 deletions GeneratorParam/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(GeneratorParam)

# You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
# - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
# - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})

#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
find_package(ROOT REQUIRED COMPONENTS EG)

#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.)

set(HEADERS GeneratorParam.h GeneratorParamLibBase.h GeneratorParamMUONlib.h PythiaDecayerConfig.h)

ROOT_GENERATE_DICTIONARY(G__GeneratorParam ${HEADERS} LINKDEF GeneratorParamLinkDef.h)

#---Create a shared library with geneated dictionary
add_library(GeneratorParam SHARED GeneratorParam.cxx GeneratorParamLibBase.cxx GeneratorParamMUONlib.cxx PythiaDecayerConfig.cxx G__GeneratorParam.cxx)
target_link_libraries(GeneratorParam ${ROOT_LIBRARIES})


set_target_properties(GeneratorParam
PROPERTIES
PUBLIC_HEADER "${HEADERS}" )


install(TARGETS GeneratorParam
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include)

if (${ROOT_VERSION} VERSION_GREATER "6.0")
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/libGeneratorParam_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libGeneratorParam.rootmap
DESTINATION lib)
endif (${ROOT_VERSION} VERSION_GREATER "6.0")

if(${CMAKE_SYSTEM} MATCHES Darwin)
set_target_properties(GeneratorParam PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif(${CMAKE_SYSTEM} MATCHES Darwin)
Loading

0 comments on commit be69648

Please sign in to comment.