Page MenuHomeHEPForge

No OneTemporary

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6df4bc5..fd749c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,140 +1,154 @@
cmake_minimum_required(VERSION 2.8 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_CXX_COMPILER_ID}" STREQUAL "GNU")
set(warnings "-Wall -Wextra -Werror -std=c++1y")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(warnings "-Wall -Wextra -Werror -std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(warnings "/W4 /WX /EHsc")
endif()
if (NOT CONFIGURED_ONCE)
set(CMAKE_CXX_FLAGS "${warnings}"
CACHE STRING "Flags used by the compiler during all build types." FORCE)
set(CMAKE_C_FLAGS "${warnings}"
CACHE STRING "Flags used by the compiler during all build types." FORCE)
endif()
## 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)
find_package(clhep REQUIRED)
find_package(lhapdf REQUIRED)
find_package(gsl REQUIRED)
find_package(Boost REQUIRED COMPONENTS iostreams)
find_package(HepMC 3)
if(${HepMC_FOUND})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_HepMC")
endif()
+find_library(LOOPTOOLS_LIBRARIES ooptools)
+if(${LOOPTOOLS_LIBRARIES} STREQUAL "LOOPTOOLS_LIBRARIES-NOTFOUND")
+ message("-- Could NOT find looptools")
+ set(LOOPTOOLS_FOUND 0)
+else()
+ message("-- Found looptools: ${LOOPTOOLS_LIBRARIES}")
+ set(LOOPTOOLS_FOUND 1)
+endif()
+
+if(${LOOPTOOLS_FOUND})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LT")
+endif()
include_directories(SYSTEM ${lhapdf_INCLUDE_PATH})
include_directories(SYSTEM ${fastjet_INCLUDE_PATH})
include_directories(SYSTEM ${clhep_INCLUDE_PATH})
include_directories(SYSTEM ${gsl_INCLUDE_PATH})
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)
install(FILES ${rhej_headers} DESTINATION include/RHEJ/)
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
)
-add_test(
- NAME t_ME_mt174
- COMMAND test_ME_hjets_mt174
- )
+if(${LOOPTOOLS_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.418e6 67247.8
)
add_test(
NAME t_4j
COMMAND check_res ${tst_dir}/4j.lhe.gz 551096 30572.5
)
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.0246366 0.001 uno
)
if(${HepMC_FOUND})
file(READ "${tst_dir}/jet_config.yml" config)
file(WRITE "${tst_dir}/jet_config_withHepMC.yml" "${config} - tst.hepmc3")
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.hepmc3
)
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
)
set(CONFIGURED_ONCE TRUE CACHE INTERNAL
"A flag showing that CMake has configured at least once.")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7a1be67..bfa3254 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,8 +1,12 @@
file(GLOB src_files *.cc)
add_library(rhej SHARED ${src_files})
set(libraries ${CMAKE_DL_LIBS} ${LHAPDF_LIBRARIES} ${CLHEP_LIBRARIES} ${FASTJET_LIBRARIES} ${GSL_LIBRARIES} ${Boost_LIBRARIES} ${HepMC_LIBRARIES} yaml-cpp)
+if(${LOOPTOOLS_FOUND})
+ set(libraries ${libraries} ${LOOPTOOLS_LIBRARIES} gfortran)
+endif()
+
target_link_libraries(rhej ${libraries})
install(TARGETS rhej DESTINATION lib)

File Metadata

Mime Type
text/x-diff
Expires
Tue, Jan 21, 2:16 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4228285
Default Alt Text
(5 KB)

Event Timeline