Commit 24a9172a authored by Andrii Verbytskyi's avatar Andrii Verbytskyi

OK

parent 594f5874
Pipeline #44560 failed with stage
in 4 minutes and 26 seconds
......@@ -187,13 +187,15 @@ install(FILES ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_BINDIR}/HepMC3-conf
include(CMakePackageConfigHelpers)
set(INCLUDE_INSTALL_DIR include )
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
set(CONFIG_INSTALL_DIR share/HepMC3/cmake )
set(INTERFACES_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/HepMC3/interfaces)
set(CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/HepMC3/cmake)
configure_package_config_file(cmake/Templates/HepMC3Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake
INSTALL_DESTINATION ${CONFIG_INSTALL_DIR}
PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR
INTERFACES_INSTALL_DIR)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/outputs/share/HepMC3/cmake/HepMC3Config.cmake DESTINATION ${CONFIG_INSTALL_DIR} COMPONENT devel)
......@@ -207,7 +209,7 @@ endif()
#Interfaces for some MCEGs
if (HEPMC3_INSTALL_INTERFACES)
install(DIRECTORY interfaces DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/../ COMPONENT devel)
install(DIRECTORY interfaces/ DESTINATION ${INTERFACES_INSTALL_DIR} COMPONENT devel)
endif()
# ROOT support
......
@PACKAGE_INIT@
set_and_check(HEPMC3_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(HEPMC3_INCLUDE_DIR @PACKAGE_INCLUDE_INSTALL_DIR@)
if(EXISTS @PACKAGE_INTERFACES_INSTALL_DIR@)
set(HEPMC3_INTERFACES_DIR @PACKAGE_INTERFACES_INSTALL_DIR@)
endif()
find_library(HEPMC3_LIB NAMES HepMC3 HINTS @PACKAGE_LIB_INSTALL_DIR@)
find_library(HEPMC3_SEARCH_LIB NAMES HepMC3search HINTS @PACKAGE_LIB_INSTALL_DIR@)
find_library(HEPMC3_ROOTIO_LIB NAMES HepMC3rootIO HINTS @PACKAGE_LIB_INSTALL_DIR@ @PACKAGE_LIB_INSTALL_DIR@/root )
find_library(HEPMC3_ROOTIO_LIB NAMES HepMC3rootIO HINTS @PACKAGE_LIB_INSTALL_DIR@ @PACKAGE_LIB_INSTALL_DIR@/root)
set(HEPMC3_ROOT_DIR @CMAKE_INSTALL_PREFIX@)
set(HEPMC3_LIBRARIES ${HEPMC3_LIB})
if(EXISTS ${HEPMC3_SEARCH_LIB})
list( APPEND HEPMC3_LIBRARIES${HEPMC3_SEARCH_LIB})
list( APPEND HEPMC3_LIBRARIES ${HEPMC3_SEARCH_LIB})
endif()
if(EXISTS ${HEPMC3_ROOTIO_LIB})
list( APPEND HEPMC3_LIBRARIES ${HEPMC3_ROOTIO_LIB})
endif()
\ No newline at end of file
list( APPEND HEPMC3_LIBRARIES ${HEPMC3_ROOTIO_LIB})
endif()
......@@ -820,8 +820,8 @@ struct Cut : public TagBase {
else if ( type == "HT" ) {
double pt = 0.0;
for ( int i = 0, N = id.size(); i < N; ++i )
if ( match(id[i]) && !match(0, id[i]) )
pt += std::sqrt(p[i][1]*p[i][1] + p[i][2]*p[i][2]);
if ( match(id[i]) && !match(0, id[i]) )
pt += std::sqrt(p[i][1]*p[i][1] + p[i][2]*p[i][2]);
if ( outside(pt) ) return false;
}
return true;
......@@ -2234,8 +2234,8 @@ public:
getattr("nreal", subevents.nreal);
getattr("ncounter", subevents.ncounter);
for ( int i = 0, N = tags.size(); i < N; ++i )
if ( tags[i]->name == "event" )
subevents.push_back(new HEPEUP(*tags[i], heprupin));
if ( tags[i]->name == "event" )
subevents.push_back(new HEPEUP(*tags[i], heprupin));
return;
} else
getattr("ntries", ntries);
......@@ -2557,8 +2557,8 @@ public:
reset();
weights = subevents[0]->weights;
for ( int ii = 1, N = subevents.size(); ii < N; ++ii )
for ( int j = 0, M = weights.size(); j < M; ++j )
weights[j].first += subevents[ii]->weights[j].first;
for ( int j = 0, M = weights.size(); j < M; ++j )
weights[j].first += subevents[ii]->weights[j].first;
currentWeight = 0;
} else {
setEvent(*subevents[i - 1]);
......
......@@ -11,6 +11,9 @@ macro( hepmc_test testname )
add_test( ${testname} ${CMAKE_CURRENT_BINARY_DIR}/${testname} )
file(GLOB INPUT${testname} "${CMAKE_CURRENT_SOURCE_DIR}/input${testname}*" )
file(COPY ${INPUT${testname}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
string(REPLACE "test" "" ${testname} name)
file(GLOB INPUT${name} "${CMAKE_CURRENT_SOURCE_DIR}/input${name}*" )
file(COPY ${INPUT${name}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endmacro( hepmc_test )
macro( hepmc_root_test testname )
......@@ -27,6 +30,9 @@ macro( hepmc_root_test testname )
add_test( ${testname} ${testname} )
file(GLOB INPUT${testname} "${CMAKE_CURRENT_SOURCE_DIR}/input${testname}*" )
file(COPY ${INPUT${testname}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
string(REPLACE "test" "" ${testname} name)
file(GLOB INPUT${name} "${CMAKE_CURRENT_SOURCE_DIR}/input${name}*" )
file(COPY ${INPUT${name}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endmacro( hepmc_root_test )
......@@ -76,7 +82,7 @@ endif()
foreach ( test ${HepMC_tests} )
hepmc_test( ${test} )
set_tests_properties(${test} PROPERTIES TIMEOUT 20) #Relevant for testLoops
set_tests_properties(${test} PROPERTIES TIMEOUT 2000) #Relevant for testLoops
endforeach ( test ${HepMC_tests} )
if(Threads_FOUND)
......@@ -210,6 +216,9 @@ endif()
add_test( ${testname} ${testname} )
file(GLOB INPUT${testname} "${CMAKE_CURRENT_SOURCE_DIR}/input${testname}*" )
file(COPY ${INPUT${testname}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
string(REPLACE "test" "" ${testname} name)
file(GLOB INPUT${name} "${CMAKE_CURRENT_SOURCE_DIR}/input${name}*" )
file(COPY ${INPUT${name}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endmacro( hepmc_mceghepmc3_test )
......@@ -252,6 +261,9 @@ macro( hepmc_mceghepmc2_test testname )
add_test( hepmc2_${testname} hepmc2_${testname} )
file(GLOB INPUThepmc2_${testname} "${CMAKE_CURRENT_SOURCE_DIR}/input${testname}*" )
file(COPY ${INPUThepmc2_${testname}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
string(REPLACE "test" "" ${testname} name)
file(GLOB INPUThepmc2_${name} "${CMAKE_CURRENT_SOURCE_DIR}/input${name}*" )
file(COPY ${INPUThepmc2_${name}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endmacro( hepmc_mceghepmc2_test )
......@@ -272,8 +284,11 @@ macro(add_memcheck_test binaryname )
set(memcheck_command "${MEMORYCHECK_COMMAND} ${MEMORYCHECK_COMMAND_OPTIONS}")
separate_arguments(memcheck_command)
add_test(memcheck_${binaryname} ${memcheck_command} ./${binaryname} ${ARGN})
file(GLOB INPUTmemcheck_${testname} "${CMAKE_CURRENT_SOURCE_DIR}/input${testname}*" )
file(COPY ${INPUTmemcheck_${testname}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(GLOB INPUTmemcheck_${binaryname} "${CMAKE_CURRENT_SOURCE_DIR}/input${binaryname}*" )
file(COPY ${INPUTmemcheck_${binaryname}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
string(REPLACE "test" "" ${binaryname} name)
file(GLOB INPUTmemcheck_${name} "${CMAKE_CURRENT_SOURCE_DIR}/input${name}*" )
file(COPY ${INPUTmemcheck_${name}} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endmacro(add_memcheck_test)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment