Page MenuHomeHEPForge

No OneTemporary

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba3bb53..f5ecb1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,147 +1,138 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+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_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)
+## 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 11)
## 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_package(QCDloop 2)
if(${QCDloop_FOUND})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_QCDLOOP")
include_directories(SYSTEM ${QCDloop_INCLUDE_PATH})
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
)
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.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/FixedOrderGen/CMakeLists.txt b/FixedOrderGen/CMakeLists.txt
index 9745702..4d763ed 100644
--- a/FixedOrderGen/CMakeLists.txt
+++ b/FixedOrderGen/CMakeLists.txt
@@ -1,82 +1,63 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project("Fixed Order Generation" 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")
+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()
-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()
-
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_STANDARD 11)
## Add directories and find dependences
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake/Modules/")
#find_library(rhej rhej_)
find_package(ROOT MODULE COMPONENTS Hist Tree MathCore)
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_package(QCDloop 2)
-if(${QCDloop_FOUND})
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRHEJ_BUILD_WITH_QCDLOOP")
- include_directories(SYSTEM ${QCDloop_INCLUDE_PATH})
-endif()
include_directories(SYSTEM ${ROOT_INCLUDE_DIR})
include_directories(SYSTEM ${lhapdf_INCLUDE_PATH})
include_directories(SYSTEM ${fastjet_INCLUDE_PATH})
include_directories(SYSTEM ${clhep_INCLUDE_PATH})
include_directories(SYSTEM ${gsl_INCLUDE_PATH})
link_directories(${ROOT_LIBRARY_DIR})
-#add_subdirectory(src)
-
## define executable
file(GLOB FOgen_source ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
list(REMOVE_ITEM FOgen_source ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc)
add_library(hejfog STATIC ${FOgen_source})
add_executable(FOgen ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc)
## link libraries
set(libraries ${CMAKE_DL_LIBS} ${LHAPDF_LIBRARIES} ${CLHEP_LIBRARIES} ${FASTJET_LIBRARIES} ${GSL_LIBRARIES} ${Boost_LIBRARIES} ${HepMC_LIBRARIES} ${ROOT_LIBRARIES} yaml-cpp)
if(${QCDloop_FOUND})
list(APPEND libraries ${QCDloop_LIBRARIES} quadmath)
endif()
# add libraries for reversed HEJ <by hand>
-list(APPEND libraries "/home/andersen/HEJ/PURE/GitReverse/run/lib/librhej.so")
+list(APPEND libraries rhej)
target_link_libraries(hejfog ${libraries})
target_link_libraries(FOgen hejfog)
install(TARGETS FOgen DESTINATION bin)
enable_testing()
set(tst_dir "${CMAKE_CURRENT_SOURCE_DIR}/t")
add_executable(test_h_2j ${tst_dir}/h_2j.cc)
target_link_libraries(test_h_2j hejfog)
add_test(NAME t_h_2j COMMAND test_h_2j WORKING_DIRECTORY ${tst_dir})
add_executable(test_h_3j ${tst_dir}/h_3j.cc)
target_link_libraries(test_h_3j hejfog)
add_test(NAME t_h_3j COMMAND test_h_3j WORKING_DIRECTORY ${tst_dir})
-
-set(CONFIGURED_ONCE TRUE CACHE INTERNAL
- "A flag showing that CMake has configured at least once.")

File Metadata

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

Event Timeline