Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7877253
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
View Options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b947ba4..f814556 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,145 +1,147 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project("Reversed HEJ" C CXX)
## Flags for the compiler. No warning allowed.
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
elseif (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /EHsc")
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
## Add directories and find dependences
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(fastjet REQUIRED)
include_directories(${fastjet_INCLUDE_PATH})
find_package(clhep REQUIRED)
include_directories(${clhep_INCLUDE_PATH})
find_package(lhapdf REQUIRED)
include_directories(${lhapdf_INCLUDE_PATH})
find_package(gsl REQUIRED)
include_directories(${gsl_INCLUDE_PATH})
find_package(Boost REQUIRED COMPONENTS iostreams)
include_directories(${Boost_INCLUDE_DIRS})
# find_package(yaml-cpp REQUIRED)
# include_directories(${YAML_CPP_INCLUDE_DIR})
find_package(HepMC 2)
if(${HepMC_FOUND})
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_HepMC_VERSION=${HepMC_VERSION_MAJOR}"
)
include_directories(${HepMC_INCLUDE_DIRS})
endif()
find_package(QCDloop 2)
if(${QCDloop_FOUND})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_QCDLOOP")
include_directories(SYSTEM ${QCDloop_INCLUDE_DIRS})
endif()
add_subdirectory(src)
## define executable
add_executable(rHEJ src/main.cc)
## link libraries
target_link_libraries(rHEJ rhej)
#plugins
add_subdirectory("analysis-plugins")
file(GLOB rhej_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/RHEJ/*.hh)
file(GLOB lhef_headers ${CMAKE_CURRENT_SOURCE_DIR}/include/LHEF/*.h)
install(FILES ${rhej_headers} DESTINATION include/RHEJ/)
install(FILES ${lhef_headers} DESTINATION include/LHEF/)
install(TARGETS rHEJ DESTINATION bin)
enable_testing()
set(tst_dir "${CMAKE_CURRENT_SOURCE_DIR}/t")
add_executable(test_Matrix ${tst_dir}/test_Matrix.cc)
add_executable(test_classify ${tst_dir}/test_classify.cc)
add_executable(test_psp ${tst_dir}/test_psp.cc)
add_executable(test_ME_h_3j ${tst_dir}/test_ME_h_3j.cc)
add_executable(test_ME_hjets_mt174 ${tst_dir}/test_ME_hjets_mt174.cc)
add_executable(check_res ${tst_dir}/check_res.cc)
add_executable(check_lhe ${tst_dir}/check_lhe.cc)
target_link_libraries(test_Matrix rhej)
target_link_libraries(test_classify rhej)
target_link_libraries(test_psp rhej)
target_link_libraries(test_ME_h_3j rhej)
target_link_libraries(test_ME_hjets_mt174 rhej)
target_link_libraries(check_res rhej)
target_link_libraries(check_lhe rhej)
add_test(
NAME t_matrix
COMMAND test_Matrix
)
add_test(
NAME t_classify
COMMAND test_classify ${tst_dir}/classify.lhe.gz
)
add_test(
NAME t_psp
COMMAND test_psp ${tst_dir}/psp_gen.lhe.gz
)
add_test(
NAME t_ME
COMMAND test_ME_h_3j
)
if(${QCDloop_FOUND})
add_test(
NAME t_ME_mt174
COMMAND test_ME_hjets_mt174
)
endif()
add_test(
NAME t_2j
COMMAND check_res ${tst_dir}/2j.lhe.gz 3.382e7 752159
)
add_test(
NAME t_3j
COMMAND check_res ${tst_dir}/3j.lhe.gz 2.5019e+06 97075
)
add_test(
NAME t_4j
COMMAND check_res ${tst_dir}/4j.lhe.gz 479170 19203.9
)
add_test(
NAME t_h_3j
COMMAND check_res ${tst_dir}/h_3j.lhe.gz 0.793107 0.0479054
)
add_test(
NAME t_h_3j_uno
COMMAND check_res ${tst_dir}/h_3j_uno.lhe.gz 0.0260428 0.00129855 uno
)
if(${HepMC_FOUND})
file(READ "${tst_dir}/jet_config.yml" config)
file(WRITE "${tst_dir}/jet_config_withHepMC.yml" "${config} - tst.hepmc")
- add_executable(check_hepmc ${tst_dir}/check_hepmc.cc)
- target_link_libraries(check_hepmc rhej)
add_test(
NAME t_main
COMMAND rHEJ ${tst_dir}/jet_config_withHepMC.yml ${tst_dir}/2j.lhe.gz
)
- add_test(
- NAME t_hepmc
- COMMAND check_hepmc tst.hepmc
- )
+ if(${HepMC_VERSION_MAJOR} GREATER 2)
+ add_executable(check_hepmc ${tst_dir}/check_hepmc.cc)
+ target_link_libraries(check_hepmc rhej)
+ add_test(
+ NAME t_hepmc
+ COMMAND check_hepmc tst.hepmc
+ )
+ endif()
else()
add_test(
NAME t_main
COMMAND rHEJ ${tst_dir}/jet_config.yml ${tst_dir}/2j.lhe.gz
)
endif()
add_test(
NAME t_lhe
COMMAND check_lhe tst.lhe
)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 2:57 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3804883
Default Alt Text
(4 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment