HepMC3 3.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- HepMC3-3.1.2/CMakeLists.txt +340 -0
- HepMC3-3.1.2/COPYING +674 -0
- HepMC3-3.1.2/HepMC3-config.in +75 -0
- HepMC3-3.1.2/HepMC3.egg-info/PKG-INFO +13 -0
- HepMC3-3.1.2/HepMC3.egg-info/SOURCES.txt +180 -0
- HepMC3-3.1.2/HepMC3.egg-info/dependency_links.txt +1 -0
- HepMC3-3.1.2/HepMC3.egg-info/top_level.txt +1 -0
- HepMC3-3.1.2/MANIFEST.in +30 -0
- HepMC3-3.1.2/PKG-INFO +13 -0
- HepMC3-3.1.2/README-for-developers +102 -0
- HepMC3-3.1.2/README.md +91 -0
- HepMC3-3.1.2/cmake/Modules/CMakeMacroParseArguments.cmake +138 -0
- HepMC3-3.1.2/cmake/Modules/CPackDeb.cmake +455 -0
- HepMC3-3.1.2/cmake/Modules/CPackRPM.cmake +1787 -0
- HepMC3-3.1.2/cmake/Modules/FindHepMC2.cmake +45 -0
- HepMC3-3.1.2/cmake/Modules/FindMCTester.cmake +35 -0
- HepMC3-3.1.2/cmake/Modules/FindPhotospp.cmake +53 -0
- HepMC3-3.1.2/cmake/Modules/FindPythia8.cmake +55 -0
- HepMC3-3.1.2/cmake/Modules/FindTauolapp.cmake +36 -0
- HepMC3-3.1.2/cmake/Templates/HepMC3Config.cmake.in +19 -0
- HepMC3-3.1.2/cmake/Templates/cmake_uninstall.cmake.in +21 -0
- HepMC3-3.1.2/doc/doxygen/.gitignore +1 -0
- HepMC3-3.1.2/doc/doxygen/Doxyfile +1870 -0
- HepMC3-3.1.2/doc/doxygen/DoxygenLayout.xml +117 -0
- HepMC3-3.1.2/doc/doxygen/LHEF.txt +566 -0
- HepMC3-3.1.2/doc/doxygen/Makefile +11 -0
- HepMC3-3.1.2/doc/doxygen/ReaderFactory.txt +69 -0
- HepMC3-3.1.2/doc/doxygen/building.txt +28 -0
- HepMC3-3.1.2/doc/doxygen/class_diagram.png +0 -0
- HepMC3-3.1.2/doc/doxygen/class_diagram_3.0.png +0 -0
- HepMC3-3.1.2/doc/doxygen/differences.txt +415 -0
- HepMC3-3.1.2/doc/doxygen/features.txt +132 -0
- HepMC3-3.1.2/doc/doxygen/mainpage.txt +67 -0
- HepMC3-3.1.2/doc/doxygen/modules.txt +107 -0
- HepMC3-3.1.2/doc/doxygen/search.txt +259 -0
- HepMC3-3.1.2/examples/BasicExamples/CMakeLists.txt +40 -0
- HepMC3-3.1.2/examples/BasicExamples/HepMC2_reader_example.cc +65 -0
- HepMC3-3.1.2/examples/BasicExamples/HepMC3_fileIO_example.cc +85 -0
- HepMC3-3.1.2/examples/BasicExamples/basic_tree.cc +239 -0
- HepMC3-3.1.2/examples/BasicExamples/hepevt_wrapper_example_fortran.f +151 -0
- HepMC3-3.1.2/examples/BasicExamples/hepevt_wrapper_example_main.cc +119 -0
- HepMC3-3.1.2/examples/CMakeLists.txt +97 -0
- HepMC3-3.1.2/examples/ConvertExample/CMakeLists.txt +72 -0
- HepMC3-3.1.2/examples/ConvertExample/cmdline.c +1697 -0
- HepMC3-3.1.2/examples/ConvertExample/cmdline.h +206 -0
- HepMC3-3.1.2/examples/ConvertExample/convert_example.cc +235 -0
- HepMC3-3.1.2/examples/ConvertExample/convert_example_env.sh.in +18 -0
- HepMC3-3.1.2/examples/ConvertExample/include/ReaderGZ.h +124 -0
- HepMC3-3.1.2/examples/ConvertExample/include/WriterDOT.h +56 -0
- HepMC3-3.1.2/examples/ConvertExample/include/WriterHEPEVTZEUS.h +29 -0
- HepMC3-3.1.2/examples/ConvertExample/include/WriterRootTreeOPAL.h +35 -0
- HepMC3-3.1.2/examples/ConvertExample/include/gzstream.h +121 -0
- HepMC3-3.1.2/examples/ConvertExample/src/WriterDOT.cc +135 -0
- HepMC3-3.1.2/examples/ConvertExample/src/WriterHEPEVTZEUS.cc +26 -0
- HepMC3-3.1.2/examples/ConvertExample/src/WriterRootTreeOPAL.cc +29 -0
- HepMC3-3.1.2/examples/ConvertExample/src/gzstream.C +165 -0
- HepMC3-3.1.2/examples/LHEFExample/CMakeLists.txt +24 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example.lhe +1571 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_1.plhe +1241 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_1_cmp.plhe +1305 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_1_out.plhe +1305 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_2.plhe +1195 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_2_cmp.plhe +1258 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_2_out.plhe +1258 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_cat.cc +205 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_cmp.lhe +1210 -0
- HepMC3-3.1.2/examples/LHEFExample/LHEF_example_env.sh.in +18 -0
- HepMC3-3.1.2/examples/Pythia6Example/CMakeLists.txt +18 -0
- HepMC3-3.1.2/examples/Pythia6Example/main63.f +217 -0
- HepMC3-3.1.2/examples/Pythia6Example/pythia-6.4.28.f +81739 -0
- HepMC3-3.1.2/examples/Pythia8Example/CMakeLists.txt +67 -0
- HepMC3-3.1.2/examples/Pythia8Example/cmake/Modules/FindPythia8.cmake +55 -0
- HepMC3-3.1.2/examples/Pythia8Example/pythia8_ee_to_Z_to_tautau.conf +27 -0
- HepMC3-3.1.2/examples/Pythia8Example/pythia8_example.cc +61 -0
- HepMC3-3.1.2/examples/Pythia8Example/pythia8_example_env.sh.in +19 -0
- HepMC3-3.1.2/examples/Pythia8Example/pythia8_pp_minbias.conf +56 -0
- HepMC3-3.1.2/examples/RootIOExample/CMakeLists.txt +27 -0
- HepMC3-3.1.2/examples/RootIOExample/example.hepmc3 +2405 -0
- HepMC3-3.1.2/examples/RootIOExample/rootIO_example_env.sh.in +18 -0
- HepMC3-3.1.2/examples/RootIOExample/rootIO_example_read.cc +62 -0
- HepMC3-3.1.2/examples/RootIOExample/rootIO_example_write.cc +62 -0
- HepMC3-3.1.2/examples/RootIOExample2/CMakeLists.txt +46 -0
- HepMC3-3.1.2/examples/RootIOExample2/class_example_env.sh.in +18 -0
- HepMC3-3.1.2/examples/RootIOExample2/class_example_read.cc +95 -0
- HepMC3-3.1.2/examples/RootIOExample2/class_example_write.cc +98 -0
- HepMC3-3.1.2/examples/RootIOExample2/example.hepmc3 +2405 -0
- HepMC3-3.1.2/examples/RootIOExample2/include/LinkDef.h +8 -0
- HepMC3-3.1.2/examples/RootIOExample2/include/MyClass.h +33 -0
- HepMC3-3.1.2/examples/RootIOExample2/include/MyRunClass.h +32 -0
- HepMC3-3.1.2/examples/RootIOExample2/include/myclass_Classes.h +4 -0
- HepMC3-3.1.2/examples/RootIOExample2/src/MyClass.cc +23 -0
- HepMC3-3.1.2/examples/RootIOExample2/src/MyRunClass.cc +24 -0
- HepMC3-3.1.2/examples/RootIOExample3/CMakeLists.txt +27 -0
- HepMC3-3.1.2/examples/RootIOExample3/rootIOTree_example_env.sh.in +18 -0
- HepMC3-3.1.2/examples/RootIOExample3/rootIOTree_example_read.cc +62 -0
- HepMC3-3.1.2/examples/RootIOExample3/rootIOTree_example_write.cc +62 -0
- HepMC3-3.1.2/examples/ViewerExample/CMakeLists.txt +33 -0
- HepMC3-3.1.2/examples/ViewerExample/cmake/Modules/FindGraphviz.cmake +86 -0
- HepMC3-3.1.2/examples/ViewerExample/include/HepMC3ViewerFrame.h +69 -0
- HepMC3-3.1.2/examples/ViewerExample/include/LinkDef.h +6 -0
- HepMC3-3.1.2/examples/ViewerExample/src/HepMC3ViewerFrame.cc +337 -0
- HepMC3-3.1.2/examples/ViewerExample/src/main.cc +20 -0
- HepMC3-3.1.2/include/HepMC3/AssociatedParticle.h +75 -0
- HepMC3-3.1.2/include/HepMC3/Attribute.h +680 -0
- HepMC3-3.1.2/include/HepMC3/Data/GenEventData.h +61 -0
- HepMC3-3.1.2/include/HepMC3/Data/GenParticleData.h +34 -0
- HepMC3-3.1.2/include/HepMC3/Data/GenRunInfoData.h +36 -0
- HepMC3-3.1.2/include/HepMC3/Data/GenVertexData.h +36 -0
- HepMC3-3.1.2/include/HepMC3/Errors.h +65 -0
- HepMC3-3.1.2/include/HepMC3/FourVector.h +320 -0
- HepMC3-3.1.2/include/HepMC3/GenCrossSection.h +160 -0
- HepMC3-3.1.2/include/HepMC3/GenCrossSection_fwd.h +25 -0
- HepMC3-3.1.2/include/HepMC3/GenEvent.h +425 -0
- HepMC3-3.1.2/include/HepMC3/GenHeavyIon.h +253 -0
- HepMC3-3.1.2/include/HepMC3/GenHeavyIon_fwd.h +25 -0
- HepMC3-3.1.2/include/HepMC3/GenParticle.h +163 -0
- HepMC3-3.1.2/include/HepMC3/GenParticle_fwd.h +35 -0
- HepMC3-3.1.2/include/HepMC3/GenPdfInfo.h +66 -0
- HepMC3-3.1.2/include/HepMC3/GenPdfInfo_fwd.h +25 -0
- HepMC3-3.1.2/include/HepMC3/GenRunInfo.h +201 -0
- HepMC3-3.1.2/include/HepMC3/GenVertex.h +168 -0
- HepMC3-3.1.2/include/HepMC3/GenVertex_fwd.h +28 -0
- HepMC3-3.1.2/include/HepMC3/HEPEVT_Wrapper.h +268 -0
- HepMC3-3.1.2/include/HepMC3/HepMC3.h +30 -0
- HepMC3-3.1.2/include/HepMC3/LHEF.h +3380 -0
- HepMC3-3.1.2/include/HepMC3/LHEFAttributes.h +127 -0
- HepMC3-3.1.2/include/HepMC3/Print.h +134 -0
- HepMC3-3.1.2/include/HepMC3/PrintStreams.h +59 -0
- HepMC3-3.1.2/include/HepMC3/Reader.h +60 -0
- HepMC3-3.1.2/include/HepMC3/ReaderAscii.h +173 -0
- HepMC3-3.1.2/include/HepMC3/ReaderAsciiHepMC2.h +142 -0
- HepMC3-3.1.2/include/HepMC3/ReaderFactory.h +102 -0
- HepMC3-3.1.2/include/HepMC3/ReaderHEPEVT.h +95 -0
- HepMC3-3.1.2/include/HepMC3/ReaderLHEF.h +59 -0
- HepMC3-3.1.2/include/HepMC3/Setup.h +72 -0
- HepMC3-3.1.2/include/HepMC3/Units.h +113 -0
- HepMC3-3.1.2/include/HepMC3/Version.h +25 -0
- HepMC3-3.1.2/include/HepMC3/Writer.h +58 -0
- HepMC3-3.1.2/include/HepMC3/WriterAscii.h +128 -0
- HepMC3-3.1.2/include/HepMC3/WriterAsciiHepMC2.h +131 -0
- HepMC3-3.1.2/include/HepMC3/WriterHEPEVT.h +84 -0
- HepMC3-3.1.2/rootIO/CMakeLists.txt +20 -0
- HepMC3-3.1.2/rootIO/include/HepMC3/ReaderRoot.h +66 -0
- HepMC3-3.1.2/rootIO/include/HepMC3/ReaderRootTree.h +82 -0
- HepMC3-3.1.2/rootIO/include/HepMC3/WriterRoot.h +75 -0
- HepMC3-3.1.2/rootIO/include/HepMC3/WriterRootTree.h +92 -0
- HepMC3-3.1.2/rootIO/include/LinkDef.hh +28 -0
- HepMC3-3.1.2/rootIO/include/rootIO_Classes.hh +13 -0
- HepMC3-3.1.2/rootIO/src/ReaderRoot.cc +85 -0
- HepMC3-3.1.2/rootIO/src/ReaderRootTree.cc +108 -0
- HepMC3-3.1.2/rootIO/src/Streamers.cc +70 -0
- HepMC3-3.1.2/rootIO/src/WriterRoot.cc +83 -0
- HepMC3-3.1.2/rootIO/src/WriterRootTree.cc +107 -0
- HepMC3-3.1.2/search/CMakeLists.txt +33 -0
- HepMC3-3.1.2/search/include/HepMC3/AttributeFeature.h +60 -0
- HepMC3-3.1.2/search/include/HepMC3/Feature.h +322 -0
- HepMC3-3.1.2/search/include/HepMC3/Filter.h +61 -0
- HepMC3-3.1.2/search/include/HepMC3/FilterAttribute.h +82 -0
- HepMC3-3.1.2/search/include/HepMC3/Relatives.h +212 -0
- HepMC3-3.1.2/search/include/HepMC3/Selector.h +164 -0
- HepMC3-3.1.2/search/src/Relatives.cc +18 -0
- HepMC3-3.1.2/search/src/Selector.cc +34 -0
- HepMC3-3.1.2/setup.cfg +4 -0
- HepMC3-3.1.2/setup.py +225 -0
- HepMC3-3.1.2/src/GenCrossSection.cc +112 -0
- HepMC3-3.1.2/src/GenEvent.cc +822 -0
- HepMC3-3.1.2/src/GenHeavyIon.cc +157 -0
- HepMC3-3.1.2/src/GenParticle.cc +114 -0
- HepMC3-3.1.2/src/GenPdfInfo.cc +106 -0
- HepMC3-3.1.2/src/GenRunInfo.cc +133 -0
- HepMC3-3.1.2/src/GenVertex.cc +141 -0
- HepMC3-3.1.2/src/HEPEVT_Wrapper.cc +252 -0
- HepMC3-3.1.2/src/LHEFAttributes.cc +82 -0
- HepMC3-3.1.2/src/Print.cc +340 -0
- HepMC3-3.1.2/src/ReaderAscii.cc +545 -0
- HepMC3-3.1.2/src/ReaderAsciiHepMC2.cc +655 -0
- HepMC3-3.1.2/src/ReaderHEPEVT.cc +168 -0
- HepMC3-3.1.2/src/ReaderLHEF.cc +129 -0
- HepMC3-3.1.2/src/Setup.cc +27 -0
- HepMC3-3.1.2/src/WriterAscii.cc +379 -0
- HepMC3-3.1.2/src/WriterAsciiHepMC2.cc +423 -0
- HepMC3-3.1.2/src/WriterHEPEVT.cc +87 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
|
|
2
|
+
#----------------------------------------------------------------------------
|
|
3
|
+
project(HepMC3)
|
|
4
|
+
set(PROJECT_VERSION 3.01.02)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
8
|
+
|
|
9
|
+
#---Setting HepMC3 Build type-----------------------------------------------
|
|
10
|
+
if(CMAKE_BUILD_TYPE)
|
|
11
|
+
message(STATUS "HepMC3 Build type: ${CMAKE_BUILD_TYPE}")
|
|
12
|
+
else(CMAKE_BUILD_TYPE)
|
|
13
|
+
set(CMAKE_BUILD_TYPE "Release")
|
|
14
|
+
message(STATUS "HepMC3 Build type not specified, use: ${CMAKE_BUILD_TYPE}")
|
|
15
|
+
endif(CMAKE_BUILD_TYPE)
|
|
16
|
+
|
|
17
|
+
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
|
|
18
|
+
|
|
19
|
+
#-------------Options-------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
option(HEPMC3_ENABLE_SEARCH "Enables building of search library" ON)
|
|
22
|
+
option(HEPMC3_ENABLE_ROOTIO "Enables building with ROOT O/I." ON)
|
|
23
|
+
option(HEPMC3_BUILD_EXAMPLES "Enables building of examples." OFF)
|
|
24
|
+
option(HEPMC3_ENABLE_TEST "Enables building of tests." OFF)
|
|
25
|
+
option(HEPMC3_INSTALL_INTERFACES "Enables installation of HepMC3 interfaces." OFF)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
message(STATUS "HepMC3: HEPMC3_ENABLE_SEARCH ${HEPMC3_ENABLE_SEARCH}")
|
|
29
|
+
message(STATUS "HepMC3: HEPMC3_ENABLE_ROOTIO ${HEPMC3_ENABLE_ROOTIO}")
|
|
30
|
+
message(STATUS "HepMC3: HEPMC3_BUILD_EXAMPLES ${HEPMC3_BUILD_EXAMPLES}")
|
|
31
|
+
message(STATUS "HepMC3: HEPMC3_ENABLE_TEST ${HEPMC3_ENABLE_TEST}")
|
|
32
|
+
message(STATUS "HepMC3: HEPMC3_INSTALL_INTERFACES ${HEPMC3_INSTALL_INTERFACES}")
|
|
33
|
+
|
|
34
|
+
if(HEPMC3_ENABLE_ROOTIO)
|
|
35
|
+
if( EXISTS "$ENV{ROOTSYS}" )
|
|
36
|
+
message(STATUS "HepMC3: ROOTSYS provided $ENV{ROOTSYS}")
|
|
37
|
+
elseif(ROOT_DIR)
|
|
38
|
+
message(STATUS "HepMC3: ROOT_DIR provided ${ROOT_DIR}")
|
|
39
|
+
else()
|
|
40
|
+
message(STATUS "HepMC3 warning: Building of ROOTIO requested but no ROOTSYS or ROOT_DIR provided")
|
|
41
|
+
message(STATUS "HepMC3 warning: Build will use ROOTConfig.cmake or FindROOT.cmake")
|
|
42
|
+
endif()
|
|
43
|
+
endif()
|
|
44
|
+
|
|
45
|
+
# - Prepend our own CMake Modules to the search path
|
|
46
|
+
# This allows us to customize, add, and factor out functionality
|
|
47
|
+
# NB: if our custom modules include others that we don't supply, those in the
|
|
48
|
+
# base path will be used, so watch for incompatibilities!!
|
|
49
|
+
#
|
|
50
|
+
set(CMAKE_MODULE_PATH
|
|
51
|
+
${PROJECT_SOURCE_DIR}/cmake/Modules
|
|
52
|
+
${CMAKE_MODULE_PATH})
|
|
53
|
+
|
|
54
|
+
include(CheckCXXCompilerFlag)
|
|
55
|
+
|
|
56
|
+
CHECK_CXX_COMPILER_FLAG("/D _CRT_SECURE_NO_WARNINGS" COMPILER_SUPPORTS__CRT_SECURE_NO_WARNINGS)
|
|
57
|
+
if(COMPILER_SUPPORTS__CRT_SECURE_NO_WARNINGS)
|
|
58
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _CRT_SECURE_NO_WARNINGS /wd4267 /wd4244 /wd4477")
|
|
59
|
+
endif()
|
|
60
|
+
CHECK_CXX_COMPILER_FLAG("/Zc:__cplusplus" COMPILER_SUPPORTS_ZCPLUSPLUS)
|
|
61
|
+
if(COMPILER_SUPPORTS_ZCPLUSPLUS)
|
|
62
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
|
|
63
|
+
endif()
|
|
64
|
+
|
|
65
|
+
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
|
66
|
+
if(COMPILER_SUPPORTS_CXX11 AND NOT COMPILER_SUPPORTS_ZCPLUSPLUS)
|
|
67
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
68
|
+
endif()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
if ( "${CMAKE_CXX_COMPILE_FEATURES}" MATCHES "cxx_range_for" )
|
|
72
|
+
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has cxx_range_for support.")
|
|
73
|
+
endif()
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
message(STATUS "HepMC3: CXX FLAGS ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}} " )
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
#This module respects HFS, e.g. defines lib or lib64 when it is needed.
|
|
81
|
+
include("GNUInstallDirs")
|
|
82
|
+
#### RPATH handling #####
|
|
83
|
+
|
|
84
|
+
set(CMAKE_MACOSX_RPATH 1)
|
|
85
|
+
|
|
86
|
+
# use, i.e. don't skip the full RPATH for the build tree
|
|
87
|
+
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
|
88
|
+
|
|
89
|
+
# when building, don't use the install RPATH already
|
|
90
|
+
# (but later on when installing)
|
|
91
|
+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
|
92
|
+
|
|
93
|
+
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
|
94
|
+
|
|
95
|
+
# add the automatically determined parts of the RPATH
|
|
96
|
+
# which point to directories outside the build tree to the install RPATH
|
|
97
|
+
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
98
|
+
|
|
99
|
+
# the RPATH to be used when installing, but only if it's not a system directory
|
|
100
|
+
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" isSystemDir)
|
|
101
|
+
IF("${isSystemDir}" STREQUAL "-1")
|
|
102
|
+
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
|
103
|
+
ENDIF("${isSystemDir}" STREQUAL "-1")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
#---Optional build of rootIO-------------------------------------------------
|
|
107
|
+
|
|
108
|
+
if(HEPMC3_ENABLE_ROOTIO)
|
|
109
|
+
set (ROOT_FIND_COMPONENTS Core RIO Tree)
|
|
110
|
+
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
|
|
111
|
+
list(APPEND CMAKE_PREFIX_PATH ${ROOT_DIR})
|
|
112
|
+
find_package(ROOT REQUIRED COMPONENTS Core RIO Tree)
|
|
113
|
+
message(STATUS "ROOT_USE_FILE ${ROOT_USE_FILE}")
|
|
114
|
+
include(${ROOT_USE_FILE})
|
|
115
|
+
|
|
116
|
+
message(STATUS "ROOT includes: ${ROOT_INCLUDE_DIRS}")
|
|
117
|
+
message(STATUS "ROOT libraries: ${ROOT_LIBRARIES}")
|
|
118
|
+
message(STATUS "ROOT_FOUND: ${ROOT_FOUND}")
|
|
119
|
+
|
|
120
|
+
if(ROOT_FOUND)
|
|
121
|
+
include_directories(${ROOT_INCLUDE_DIRS})
|
|
122
|
+
add_definitions(-DHEPMC3_ROOTIO)
|
|
123
|
+
set(HEPMC3_ROOTIO_LIBRARY "-lHepMC3rootIO" )
|
|
124
|
+
else()
|
|
125
|
+
message(STATUS "HepMC3 warning: ROOT needed for ROOTIO but not found")
|
|
126
|
+
message(STATUS "HepMC3 warning: Skipping HepMC ROOT IO libraries")
|
|
127
|
+
set(HEPMC3_ENABLE_ROOTIO OFF)
|
|
128
|
+
endif()
|
|
129
|
+
endif()
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
########################################################################
|
|
134
|
+
## Core
|
|
135
|
+
########################################################################
|
|
136
|
+
set( hepmc3core_sources
|
|
137
|
+
${PROJECT_SOURCE_DIR}/src/GenCrossSection.cc
|
|
138
|
+
${PROJECT_SOURCE_DIR}/src/GenParticle.cc
|
|
139
|
+
${PROJECT_SOURCE_DIR}/src/GenVertex.cc
|
|
140
|
+
${PROJECT_SOURCE_DIR}/src/Print.cc
|
|
141
|
+
${PROJECT_SOURCE_DIR}/src/Setup.cc
|
|
142
|
+
${PROJECT_SOURCE_DIR}/src/WriterHEPEVT.cc
|
|
143
|
+
${PROJECT_SOURCE_DIR}/src/GenEvent.cc
|
|
144
|
+
${PROJECT_SOURCE_DIR}/src/GenPdfInfo.cc
|
|
145
|
+
${PROJECT_SOURCE_DIR}/src/HEPEVT_Wrapper.cc
|
|
146
|
+
${PROJECT_SOURCE_DIR}/src/ReaderAscii.cc
|
|
147
|
+
${PROJECT_SOURCE_DIR}/src/ReaderHEPEVT.cc
|
|
148
|
+
${PROJECT_SOURCE_DIR}/src/WriterAscii.cc
|
|
149
|
+
${PROJECT_SOURCE_DIR}/src/GenHeavyIon.cc
|
|
150
|
+
${PROJECT_SOURCE_DIR}/src/GenRunInfo.cc
|
|
151
|
+
${PROJECT_SOURCE_DIR}/src/LHEFAttributes.cc
|
|
152
|
+
${PROJECT_SOURCE_DIR}/src/ReaderAsciiHepMC2.cc
|
|
153
|
+
${PROJECT_SOURCE_DIR}/src/ReaderLHEF.cc
|
|
154
|
+
${PROJECT_SOURCE_DIR}/src/WriterAsciiHepMC2.cc
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
#We need to export all symbols on WIn to build .lib files
|
|
158
|
+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
159
|
+
|
|
160
|
+
add_library(objlibcore OBJECT ${hepmc3core_sources})
|
|
161
|
+
# shared libraries need PIC
|
|
162
|
+
set_property(TARGET objlibcore PROPERTY POSITION_INDEPENDENT_CODE 1)
|
|
163
|
+
target_include_directories(objlibcore PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
|
164
|
+
|
|
165
|
+
add_library(HepMC3 SHARED $<TARGET_OBJECTS:objlibcore>)
|
|
166
|
+
add_library(HepMC3_static STATIC $<TARGET_OBJECTS:objlibcore>)
|
|
167
|
+
|
|
168
|
+
set_target_properties(HepMC3 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR})
|
|
169
|
+
set_target_properties(HepMC3 PROPERTIES SOVERSION 2)
|
|
170
|
+
if (WIN32)
|
|
171
|
+
set_target_properties(HepMC3_static PROPERTIES OUTPUT_NAME HepMC3-static ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR})
|
|
172
|
+
elseif()
|
|
173
|
+
set_target_properties(HepMC3_static PROPERTIES OUTPUT_NAME HepMC3 ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR})
|
|
174
|
+
endif()
|
|
175
|
+
configure_file(HepMC3-config.in ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/HepMC3-config )
|
|
176
|
+
|
|
177
|
+
#---Install build products---------------------------------------------------
|
|
178
|
+
install(TARGETS HepMC3 DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs)
|
|
179
|
+
install(TARGETS HepMC3_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs)
|
|
180
|
+
|
|
181
|
+
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT devel)
|
|
182
|
+
|
|
183
|
+
install(FILES ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/HepMC3-config DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
184
|
+
|
|
185
|
+
# Generate config CMake files to be used by other projects
|
|
186
|
+
#
|
|
187
|
+
|
|
188
|
+
include(CMakePackageConfigHelpers)
|
|
189
|
+
|
|
190
|
+
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
|
191
|
+
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
|
|
192
|
+
set(INTERFACES_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/HepMC3/interfaces)
|
|
193
|
+
set(CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/HepMC3/cmake)
|
|
194
|
+
|
|
195
|
+
configure_package_config_file(cmake/Templates/HepMC3Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake
|
|
196
|
+
INSTALL_DESTINATION ${CONFIG_INSTALL_DIR}
|
|
197
|
+
PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR
|
|
198
|
+
INTERFACES_INSTALL_DIR)
|
|
199
|
+
|
|
200
|
+
write_basic_package_version_file(
|
|
201
|
+
${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config-version.cmake
|
|
202
|
+
COMPATIBILITY SameMajorVersion
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake
|
|
206
|
+
${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config-version.cmake
|
|
207
|
+
DESTINATION ${CONFIG_INSTALL_DIR} COMPONENT devel)
|
|
208
|
+
|
|
209
|
+
########################################################################
|
|
210
|
+
## Optional packages
|
|
211
|
+
########################################################################
|
|
212
|
+
#Search engine
|
|
213
|
+
if(HEPMC3_ENABLE_SEARCH)
|
|
214
|
+
add_subdirectory(search)
|
|
215
|
+
endif()
|
|
216
|
+
|
|
217
|
+
#Interfaces for some MCEGs
|
|
218
|
+
if (HEPMC3_INSTALL_INTERFACES)
|
|
219
|
+
install(DIRECTORY interfaces/ DESTINATION ${INTERFACES_INSTALL_DIR} COMPONENT devel)
|
|
220
|
+
endif()
|
|
221
|
+
|
|
222
|
+
# ROOT support
|
|
223
|
+
if(ROOT_FOUND)
|
|
224
|
+
add_subdirectory(rootIO)
|
|
225
|
+
endif()
|
|
226
|
+
|
|
227
|
+
option(USE_INTERFACE_FROM_PYTHIA8 "Use Pythia8ToHepMC3.h from Pythia8" OFF)
|
|
228
|
+
# Add the examples subdirectories
|
|
229
|
+
if(HEPMC3_BUILD_EXAMPLES)
|
|
230
|
+
set(HepMC_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Current build directory")
|
|
231
|
+
add_subdirectory(examples)
|
|
232
|
+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples PATTERN "*config" EXCLUDE)
|
|
233
|
+
endif()
|
|
234
|
+
|
|
235
|
+
#test suite
|
|
236
|
+
if(HEPMC3_ENABLE_TEST)
|
|
237
|
+
ENABLE_TESTING()
|
|
238
|
+
add_subdirectory(test)
|
|
239
|
+
endif()
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
# uninstall target
|
|
243
|
+
if(NOT TARGET uninstall)
|
|
244
|
+
configure_file(
|
|
245
|
+
"cmake/Templates/cmake_uninstall.cmake.in"
|
|
246
|
+
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
247
|
+
IMMEDIATE @ONLY)
|
|
248
|
+
|
|
249
|
+
add_custom_target(uninstall
|
|
250
|
+
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
|
251
|
+
endif()
|
|
252
|
+
#THis is for developers only
|
|
253
|
+
find_program (ASTYLEFORMAT NAMES astyle)
|
|
254
|
+
if (ASTYLEFORMAT)
|
|
255
|
+
message(STATUS "astyle found!")
|
|
256
|
+
ADD_CUSTOM_TARGET(beautyastyle
|
|
257
|
+
COMMAND astyle --keep-one-line-blocks src/*cc rootIO/src/*cc search/src/*cc examples/*/src/*cc test/*cc test/*h
|
|
258
|
+
WORKING_DIRECTORY ${DOXYGEN_OUTPUT_DIR}
|
|
259
|
+
)
|
|
260
|
+
endif()
|
|
261
|
+
########################################################################
|
|
262
|
+
## CPACK
|
|
263
|
+
########################################################################
|
|
264
|
+
#General CPACK settings
|
|
265
|
+
INCLUDE(InstallRequiredSystemLibraries)
|
|
266
|
+
|
|
267
|
+
set(CPACK_PACKAGE_NAME "HepMC3")
|
|
268
|
+
set(CPACK_PACKAGE_VENDOR "HepMC3 Developers")
|
|
269
|
+
#Should the version be defined above?
|
|
270
|
+
set(CPACK_PACKAGE_VERSION 3)
|
|
271
|
+
set(CPACK_PACKAGE_VERSION_MAJOR 3)
|
|
272
|
+
set(CPACK_PACKAGE_VERSION_MINOR 1)
|
|
273
|
+
set(CPACK_PACKAGE_VERSION_PATCH 2)
|
|
274
|
+
set(CPACK_PACKAGE_RELEASE 0)
|
|
275
|
+
set(CPACK_PACKAGE_FILE_NAME "HepMC3")
|
|
276
|
+
set(CPACK_PACKAGE_DESCRIPTION "Event record library for high energy physics Monte Carlo")
|
|
277
|
+
|
|
278
|
+
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
|
|
279
|
+
SET(CPACK_INSTALL_PREFIX "/usr")
|
|
280
|
+
SET(CPACK_OUTPUT_FILE_PREFIX binpackages)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
SET(CPACK_BINARY_RPM "ON")
|
|
284
|
+
#RPM-specific settings
|
|
285
|
+
set(CPACK_RPM_PACKAGE_DEBUG ON)
|
|
286
|
+
set(CPACK_RPM_PACKAGE_NAME "HepMC3")
|
|
287
|
+
set(CPACK_RPM_COMPONENT_INSTALL ON)
|
|
288
|
+
set(CPACK_RPM_PACKAGE_LICENSE "GPL")
|
|
289
|
+
set(CPACK_RPM_PACKAGE_GROUP "General")
|
|
290
|
+
set(CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CPACK_PACKAGE_RELEASE}")
|
|
291
|
+
set(CPACK_RPM_libs_PACKAGE_SUMMARY "HepMC3 libraries")
|
|
292
|
+
set(CPACK_RPM_devel_PACKAGE_SUMMARY "Headers for HepMC3 libraries")
|
|
293
|
+
set(CPACK_RPM_search_libs_PACKAGE_SUMMARY "HepMC3 headers for event navigation")
|
|
294
|
+
set(CPACK_RPM_search_devel_PACKAGE_SUMMARY "HepMC3 libraries for event navigation")
|
|
295
|
+
set(CPACK_RPM_examples_PACKAGE_SUMMARY "Examples for HepMC3 library")
|
|
296
|
+
set(CPACK_RPM_libs_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
297
|
+
set(CPACK_RPM_devel_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
298
|
+
set(CPACK_RPM_search_libs_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
299
|
+
set(CPACK_RPM_search_devel_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
300
|
+
set(CPACK_RPM_examples_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
301
|
+
set(CPACK_RPM_devel_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_NAME}-libs")
|
|
302
|
+
set(CPACK_RPM_search_devel_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_NAME}-search-libs")
|
|
303
|
+
set(CPACK_RPM_examples_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_NAME}-libs, ${CPACK_RPM_PACKAGE_NAME}-rootIO-libs, ${CPACK_RPM_PACKAGE_NAME}-search-libs")
|
|
304
|
+
#Everything that goes before HepMC , i.e. top level directories,should be excluded
|
|
305
|
+
#This feature is working fine only in the recent CPackRPM module -- see cmake/modules directory.
|
|
306
|
+
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} )
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
SET(CPACK_BINARY_DEB "ON")
|
|
311
|
+
#DEB-specific settings
|
|
312
|
+
set(CPACK_DEBIAN_PACKAGE_NAME "HepMC3")
|
|
313
|
+
set(CPACK_DEB_COMPONENT_INSTALL ON)
|
|
314
|
+
set(CPACK_DEBIAN_PACKAGE_LICENSE "GPL")
|
|
315
|
+
set(CPACK_DEBIAN_PACKAGE_GROUP "General")
|
|
316
|
+
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CPACK_PACKAGE_RELEASE}")
|
|
317
|
+
set(CPACK_DEBIAN_devel_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_NAME}-libs")
|
|
318
|
+
set(CPACK_DEBIAN_search_devel_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_NAME}-search-libs")
|
|
319
|
+
set(CPACK_DEBIAN_examples_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_NAME}-libs, ${CPACK_DEBIAN_PACKAGE_NAME}-rootIO-libs")
|
|
320
|
+
set(CPACK_DEBIAN_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} )
|
|
321
|
+
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "HepMC3 Developers")
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
#NSIS-specific settings
|
|
325
|
+
SET(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/COPYING)
|
|
326
|
+
|
|
327
|
+
if(ROOT_FOUND)
|
|
328
|
+
set(CPACK_COMPONENTS_ALL devel libs rootIO-devel rootIO-libs search-libs search-devel examples)
|
|
329
|
+
set(CPACK_RPM_rootIO-libs_PACKAGE_SUMMARY "HepMC3 libraries with ROOT I/O support")
|
|
330
|
+
set(CPACK_RPM_rootIO-devel_PACKAGE_SUMMARY "Headers for HepMC3 libraries with ROOT I/O support")
|
|
331
|
+
set(CPACK_RPM_rootIO-libs_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
332
|
+
set(CPACK_RPM_rootIO-devel_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|
333
|
+
set(CPACK_RPM_rootIO-libs_PACKAGE_REQUIRES "root, ${CPACK_RPM_PACKAGE_NAME}-libs")
|
|
334
|
+
set(CPACK_RPM_rootIO-devel_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_NAME}-devel, ${CPACK_RPM_PACKAGE_NAME}-rootIO-libs")
|
|
335
|
+
SET(CPACK_DEBIAN_rootIO-libs_PACKAGE_DEPENDS "libroot, ${CPACK_DEBIAN_PACKAGE_NAME}-libs")
|
|
336
|
+
SET(CPACK_DEBIAN_rootIO-devel_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_NAME}-devel, ${CPACK_DEBIAN_PACKAGE_NAME}-rootIO-libs")
|
|
337
|
+
else()
|
|
338
|
+
set(CPACK_COMPONENTS_ALL devel libs search-libs search-devel )
|
|
339
|
+
endif()
|
|
340
|
+
INCLUDE(CPack)
|