From 74cfce6e10e367f2b04db04a5093734655568efe Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Sun, 8 Sep 2024 11:08:58 +0200 Subject: [PATCH] warning? --- .aux/test_with_lcg | 2 +- CMakeLists.txt | 3 +++ source/src/Error2Exception.cpp | 24 ++++++++++++++++-------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.aux/test_with_lcg b/.aux/test_with_lcg index 8923cec5..ee3fbb0c 100755 --- a/.aux/test_with_lcg +++ b/.aux/test_with_lcg @@ -4,4 +4,4 @@ CMTCONFIG=$2 source /cvmfs/sft.cern.ch/lcg/views/${LCG}/${CMTCONFIG}/setup.sh source build/INSTALL/thisostap.sh cd build -ctest -N && cmake .. -DCMAKE_INSTALL_PREFIX=./INSTALL/ && ctest -j4 --output-on-failure --test-output-size-failed=5000000 +ctest -N && cmake .. -DCMAKE_INSTALL_PREFIX=./INSTALL/ && ctest -j4 -R '(core|runit|logger)' --output-on-failure --test-output-size-failed=5000000 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bb4afb1..9594b3c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,4 +72,7 @@ set (CPACK_PACKAGE_VERSION_MINOR "${OSTAP_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "${OSTAP_VERSION_PATCH}") set (CPACK_PACKAGE_VERSION_TWEAK "${OSTAP_VERSION_TWEAK}") set (CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/docs/ostap.jpg ) +if ( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.7" ) + set ( CPACK_PACKAGE_CHECKSUM "SHA1" ) +endif() include (CPack) diff --git a/source/src/Error2Exception.cpp b/source/src/Error2Exception.cpp index 853889d8..bd82bb33 100644 --- a/source/src/Error2Exception.cpp +++ b/source/src/Error2Exception.cpp @@ -25,17 +25,17 @@ * @author Vanya Belyaev Ivan.Belyaev@itep.ru */ // ============================================================================ -// #include namespace { // ========================================================================== /// (previous) error handler ErrorHandlerFunc_t s_handler = nullptr ; // ========================================================================== - void errorHandler ( int level , - Bool_t abort , - const char* location , - const char* message ) + void errorHandler + ( int level , + Bool_t abort , + const char* location , + const char* message ) { // if ( gErrorIgnoreLevel == kUnset ) @@ -58,9 +58,17 @@ namespace } else if ( kWarning <= level && Py_IsInitialized() ) { - // python warning here - PyErr_WarnExplicit( NULL, (char*)message, (char*)location, 0, (char*)"ROOT", NULL ); - // std::cerr << " RAWNING HERE: loc:" << location << " mg:" << message << std::endl ; + // ==================================================================== + // python warning here + // ==================================================================== + PyErr_WarnExplicit + ( PyExc_RuntimeWarning , // NULL + message , // (char*) + location , // (char*) + 0 , // + "ROOT" , // (char*) + NULL ) ; + // ==================================================================== } else if ( nullptr != s_handler && s_handler != &errorHandler ) { (*s_handler) ( level , abort , location , message ) ; }