From a31c2f7d72b0b66027fb2b29248cdec0608a93c6 Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 14 Nov 2014 16:57:58 +0100 Subject: [PATCH] Converting PYTHIA8 to native cmake --- CMakeLists.txt | 1 + .../{ => AliPythia8}/AliDecayerPythia8.cxx | 0 PYTHIA8/{ => AliPythia8}/AliDecayerPythia8.h | 0 PYTHIA8/{ => AliPythia8}/AliPythia8.cxx | 0 PYTHIA8/{ => AliPythia8}/AliPythia8.h | 0 PYTHIA8/{ => AliPythia8}/AliPythia8LinkDef.h | 0 PYTHIA8/{ => AliPythia8}/AliTPythia8.cxx | 0 PYTHIA8/{ => AliPythia8}/AliTPythia8.h | 0 PYTHIA8/AliPythia8/CMakeLists.txt | 70 ++++++++++++ PYTHIA8/CMakeLists.txt | 26 +++-- PYTHIA8/pythia8175/CMakeLists.txt | 107 ++++++++++++++++++ 11 files changed, 196 insertions(+), 8 deletions(-) rename PYTHIA8/{ => AliPythia8}/AliDecayerPythia8.cxx (100%) rename PYTHIA8/{ => AliPythia8}/AliDecayerPythia8.h (100%) rename PYTHIA8/{ => AliPythia8}/AliPythia8.cxx (100%) rename PYTHIA8/{ => AliPythia8}/AliPythia8.h (100%) rename PYTHIA8/{ => AliPythia8}/AliPythia8LinkDef.h (100%) rename PYTHIA8/{ => AliPythia8}/AliTPythia8.cxx (100%) rename PYTHIA8/{ => AliPythia8}/AliTPythia8.h (100%) create mode 100644 PYTHIA8/AliPythia8/CMakeLists.txt create mode 100644 PYTHIA8/pythia8175/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 4875f375a3c..6bddca4e6e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,7 @@ add_subdirectory(MUON) add_subdirectory(OADB) add_subdirectory(PHOS) add_subdirectory(PMD) +add_subdirectory(PYTHIA8) add_subdirectory(STARLIGHT) add_subdirectory(STAT) add_subdirectory(STRUCT) diff --git a/PYTHIA8/AliDecayerPythia8.cxx b/PYTHIA8/AliPythia8/AliDecayerPythia8.cxx similarity index 100% rename from PYTHIA8/AliDecayerPythia8.cxx rename to PYTHIA8/AliPythia8/AliDecayerPythia8.cxx diff --git a/PYTHIA8/AliDecayerPythia8.h b/PYTHIA8/AliPythia8/AliDecayerPythia8.h similarity index 100% rename from PYTHIA8/AliDecayerPythia8.h rename to PYTHIA8/AliPythia8/AliDecayerPythia8.h diff --git a/PYTHIA8/AliPythia8.cxx b/PYTHIA8/AliPythia8/AliPythia8.cxx similarity index 100% rename from PYTHIA8/AliPythia8.cxx rename to PYTHIA8/AliPythia8/AliPythia8.cxx diff --git a/PYTHIA8/AliPythia8.h b/PYTHIA8/AliPythia8/AliPythia8.h similarity index 100% rename from PYTHIA8/AliPythia8.h rename to PYTHIA8/AliPythia8/AliPythia8.h diff --git a/PYTHIA8/AliPythia8LinkDef.h b/PYTHIA8/AliPythia8/AliPythia8LinkDef.h similarity index 100% rename from PYTHIA8/AliPythia8LinkDef.h rename to PYTHIA8/AliPythia8/AliPythia8LinkDef.h diff --git a/PYTHIA8/AliTPythia8.cxx b/PYTHIA8/AliPythia8/AliTPythia8.cxx similarity index 100% rename from PYTHIA8/AliTPythia8.cxx rename to PYTHIA8/AliPythia8/AliTPythia8.cxx diff --git a/PYTHIA8/AliTPythia8.h b/PYTHIA8/AliPythia8/AliTPythia8.h similarity index 100% rename from PYTHIA8/AliTPythia8.h rename to PYTHIA8/AliPythia8/AliTPythia8.h diff --git a/PYTHIA8/AliPythia8/CMakeLists.txt b/PYTHIA8/AliPythia8/CMakeLists.txt new file mode 100644 index 00000000000..64f1e3b420a --- /dev/null +++ b/PYTHIA8/AliPythia8/CMakeLists.txt @@ -0,0 +1,70 @@ +# ************************************************************************** +# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * +# * * +# * Author: The ALICE Off-line Project. * +# * Contributors are mentioned in the code where appropriate. * +# * * +# * Permission to use, copy, modify and distribute this software and its * +# * documentation strictly for non-commercial purposes is hereby granted * +# * without fee, provided that the above copyright notice appears in all * +# * copies and that both the copyright notice and this permission notice * +# * appear in the supporting documentation. The authors make no claims * +# * about the suitability of this software for any purpose. It is * +# * provided "as is" without express or implied warranty. * +# ************************************************************************** + +# Module +set(MODULE AliPythia8) + +# Module include folder +include_directories(${AliRoot_SOURCE_DIR}/PYTHIA8/${MODULE}) + +# Additional include folders in alphabetical order except ROOT +include_directories(${ROOT_INCLUDE_DIRS} + ${AliRoot_SOURCE_DIR}/EVGEN + ${AliRoot_SOURCE_DIR}/LHAPDF + ${AliRoot_SOURCE_DIR}/PYTHIA6/AliPythia6 + ${AliRoot_SOURCE_DIR}/PYTHIA6/pythia6 + ${AliRoot_SOURCE_DIR}/PYTHIA8/pythia8175/include + ${AliRoot_SOURCE_DIR}/STEER/STEER + ${AliRoot_SOURCE_DIR}/STEER/STEERBase + ) + +# Sources in alphabetical order +set(SRCS + AliTPythia8.cxx + AliPythia8.cxx + AliDecayerPythia8.cxx + ) + +# Headers from sources +string(REPLACE ".cxx" ".h" HDRS "${SRCS}") + +# Generate the dictionary +# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument +get_directory_property(incdirs INCLUDE_DIRECTORIES) +generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") + +# Generate the ROOT map +# Dependecies +set(LIBDEPS STEERBase STEER pythia6 AliPythia6 LHAPDF EVGEN pythia8175 ) +generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") + + +# Add a library to the project using the specified source files +add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx) + +# Additional compilation flags +set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g") + +# System dependent: Modify the way the library is build +if(${CMAKE_SYSTEM} MATCHES Darwin) + set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") +endif(${CMAKE_SYSTEM} MATCHES Darwin) + +# Installation +install(TARGETS ${MODULE} + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(FILES ${HDRS} DESTINATION include) \ No newline at end of file diff --git a/PYTHIA8/CMakeLists.txt b/PYTHIA8/CMakeLists.txt index d3fc79746f7..f0a5e9e124b 100644 --- a/PYTHIA8/CMakeLists.txt +++ b/PYTHIA8/CMakeLists.txt @@ -1,10 +1,20 @@ -# AliRoot Build System CMakeLists for PYTHIA8 -# -# Author: Johny Jose m(johny.jose@cern.ch) -# Port of previous Makefile build to cmake +# ************************************************************************** +# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * +# * * +# * Author: The ALICE Off-line Project. * +# * Contributors are mentioned in the code where appropriate. * +# * * +# * Permission to use, copy, modify and distribute this software and its * +# * documentation strictly for non-commercial purposes is hereby granted * +# * without fee, provided that the above copyright notice appears in all * +# * copies and that both the copyright notice and this permission notice * +# * appear in the supporting documentation. The authors make no claims * +# * about the suitability of this software for any purpose. It is * +# * provided "as is" without express or implied warranty. * +# ************************************************************************** -cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) +# Include the libraries +add_subdirectory (AliPythia8) +add_subdirectory (pythia8175) -file(GLOB PACKAGES CMake*.pkg) - -ALICE_BuildModule() +message(STATUS "PYTHIA8 enabled") diff --git a/PYTHIA8/pythia8175/CMakeLists.txt b/PYTHIA8/pythia8175/CMakeLists.txt new file mode 100644 index 00000000000..7879e995ab4 --- /dev/null +++ b/PYTHIA8/pythia8175/CMakeLists.txt @@ -0,0 +1,107 @@ +# ************************************************************************** +# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * +# * * +# * Author: The ALICE Off-line Project. * +# * Contributors are mentioned in the code where appropriate. * +# * * +# * Permission to use, copy, modify and distribute this software and its * +# * documentation strictly for non-commercial purposes is hereby granted * +# * without fee, provided that the above copyright notice appears in all * +# * copies and that both the copyright notice and this permission notice * +# * appear in the supporting documentation. The authors make no claims * +# * about the suitability of this software for any purpose. It is * +# * provided "as is" without express or implied warranty. * +# **************************************************************************/ + +#Module +set (MODULE pythia8175) + +# Module include folder +include_directories(${AliRoot_SOURCE_DIR}/PYTHIA8/${MODULE}) + +# Additional includes - alphabetical order except ROOT +include_directories(${ROOT_INCLUDE_DIRS} + ${AliRoot_SOURCE_DIR}/PYTHIA8/${MODULE}/include + ) + +# Sources - alphabetical order +set(SRCS + src/Analysis.cxx + src/Basics.cxx + src/BeamParticle.cxx + src/BeamRemnants.cxx + src/BeamShape.cxx + src/BoseEinstein.cxx + src/Event.cxx + src/FragmentationFlavZpT.cxx + src/FragmentationSystems.cxx + src/HadronLevel.cxx + src/HadronScatter.cxx + src/HelicityBasics.cxx + src/HelicityMatrixElements.cxx + src/HiddenValleyFragmentation.cxx + src/History.cxx + src/Info.cxx + src/LesHouches.cxx + src/MergingHooks.cxx + src/MiniStringFragmentation.cxx + src/MultipartonInteractions.cxx + src/ParticleData.cxx + src/ParticleDecays.cxx + src/PartonDistributions.cxx + src/PartonLevel.cxx + src/PartonSystems.cxx + src/PhaseSpace.cxx + src/ProcessContainer.cxx + src/ProcessLevel.cxx + src/Pythia.cxx + src/PythiaStdlib.cxx + src/RHadrons.cxx + src/ResonanceDecays.cxx + src/ResonanceWidths.cxx + src/Settings.cxx + src/SigmaCompositeness.cxx + src/SigmaEW.cxx + src/SigmaExtraDim.cxx + src/SigmaGeneric.cxx + src/SigmaHiggs.cxx + src/SigmaLeftRightSym.cxx + src/SigmaLeptoquark.cxx + src/SigmaNewGaugeBosons.cxx + src/SigmaOnia.cxx + src/SigmaProcess.cxx + src/SigmaQCD.cxx + src/SigmaSUSY.cxx + src/SigmaTotal.cxx + src/SpaceShower.cxx + src/StandardModel.cxx + src/StringFragmentation.cxx + src/SusyCouplings.cxx + src/SusyLesHouches.cxx + src/TimeShower.cxx + src/TauDecays.cxx + src/UserHooks.cxx + src/SusyResonanceWidths.cxx + ) + +# No dictionary + +# Add a library to the project using the specified source files +add_library(${MODULE} SHARED ${SRCS}) + +# Do not generate the ROOT map + +# Additional compilation flags +set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g") +target_link_libraries(${MODULE} ) + +# System dependent: Modify the way the library is build +if(${CMAKE_SYSTEM} MATCHES Darwin) + set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") +endif(${CMAKE_SYSTEM} MATCHES Darwin) + +# Installation +install(TARGETS ${MODULE} + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) +install(FILES ${HDRS} DESTINATION include) -- 2.43.0