Skip to content
Snippets Groups Projects
Commit a8d66050 authored by Benedikt Hegner's avatar Benedikt Hegner
Browse files

hidden/fixed "missing override" warnings exposed after !192

- warnings from external headers are hidden declaring the include directories as `-system`
- warnings from a couple of new files have been fixed
- warnings in `HistogramSvc` are hidden because unavoidable (see f83c3d8e)
- warnings related to CLHEP-136 have been hidden with a special trick (see 0a238135)

See merge request !205
parents c0e5c4f9 b3182d2f
No related branches found
No related tags found
1 merge request!205hidden/fixed "missing override" warnings exposed after !192
Showing
with 169 additions and 47 deletions
......@@ -6,8 +6,8 @@ find_package(AIDA)
find_package(Boost COMPONENTS regex)
find_package(ROOT COMPONENTS RIO)
# Hide some Boost compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
# Hide some Boost/ROOT compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
#---Libraries---------------------------------------------------------------
gaudi_add_library(GaudiAlgLib src/lib/*.cpp
......
......@@ -6,8 +6,8 @@ find_package(AIDA)
find_package(Boost COMPONENTS system filesystem)
find_package(ROOT COMPONENTS Hist RIO)
# Hide some Boost compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
# Hide some Boost/ROOT compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
#---Libraries---------------------------------------------------------------
gaudi_add_module(GaudiCommonSvc
......
......@@ -11,11 +11,14 @@
#include "AIDA/IProfile1D.h"
#include "TFile.h"
#ifdef __clang__
#pragma clang diagnostic push
// Hide warning message:
// warning: 'XYZ' overrides a member function but is not marked 'override'
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Gaudi {
......@@ -239,6 +242,8 @@ namespace Gaudi {
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
#endif // AIDAROOT_GENERIC1D_H
......@@ -11,12 +11,14 @@
#include "Axis.h"
#include "TFile.h"
#ifdef __clang__
#pragma clang diagnostic push
// Hide warning message:
// warning: 'XYZ' overrides a member function but is not marked 'override'
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Gaudi {
......@@ -366,6 +368,8 @@ namespace Gaudi {
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
#endif // GAUDIPI_GENERIC2D_H
......@@ -11,11 +11,14 @@
#include <stdexcept>
#include <memory>
#ifdef __clang__
#pragma clang diagnostic push
// Hide warning message:
// warning: 'XYZ' overrides a member function but is not marked 'override'
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Gaudi {
......@@ -324,6 +327,8 @@ namespace Gaudi {
#ifdef __clang__
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
#endif // GAUDIPI_GENERIC3D_H
......@@ -5,9 +5,10 @@ gaudi_depends_on_subdirs(GaudiKernel)
find_package(Boost COMPONENTS system filesystem regex thread python)
find_package(TBB)
find_package(PythonLibs)
find_package(ROOT)
# Hide some Boost compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
# Hide some Boost/ROOT/TBB compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
#---Libraries---------------------------------------------------------------
gaudi_add_module(GaudiCoreSvc
......
......@@ -30,37 +30,37 @@ public:
typedef IAlgExecStateSvc::AlgStateMap_t AlgStateMap_t;
const AlgExecState& algExecState(const Gaudi::StringKey& algName,
const EventContext& ctx) const;
const EventContext& ctx) const override;
const AlgExecState& algExecState(IAlgorithm* iAlg,
const EventContext& ctx) const;
const EventContext& ctx) const override;
AlgExecState& algExecState(IAlgorithm* iAlg,
const EventContext& ctx);
const AlgStateMap_t& algExecStates(const EventContext& ctx) const;
const EventContext& ctx) override;
const AlgStateMap_t& algExecStates(const EventContext& ctx) const override;
const AlgExecState& algExecState(const Gaudi::StringKey& algName) const;
const AlgExecState& algExecState(IAlgorithm* iAlg) const;
AlgExecState& algExecState(IAlgorithm* iAlg);
const AlgStateMap_t& algExecStates() const;
const AlgExecState& algExecState(const Gaudi::StringKey& algName) const override;
const AlgExecState& algExecState(IAlgorithm* iAlg) const override;
AlgExecState& algExecState(IAlgorithm* iAlg) override;
const AlgStateMap_t& algExecStates() const override;
void reset(const EventContext& ctx);
void reset();
void reset(const EventContext& ctx) override;
void reset() override;
void addAlg(IAlgorithm* iAlg);
void addAlg(const Gaudi::StringKey& algName);
void addAlg(IAlgorithm* iAlg) override;
void addAlg(const Gaudi::StringKey& algName) override;
const EventStatus::Status& eventStatus() const;
const EventStatus::Status& eventStatus(const EventContext& ctx) const;
const EventStatus::Status& eventStatus() const override;
const EventStatus::Status& eventStatus(const EventContext& ctx) const override;
void setEventStatus(const EventStatus::Status& sc);
void setEventStatus(const EventStatus::Status& sc, const EventContext& ctx);
void setEventStatus(const EventStatus::Status& sc) override;
void setEventStatus(const EventStatus::Status& sc, const EventContext& ctx) override;
void updateEventStatus(const bool& b);
void updateEventStatus(const bool& b, const EventContext& ctx);
void updateEventStatus(const bool& b) override;
void updateEventStatus(const bool& b, const EventContext& ctx) override;
void dump(std::ostringstream& ost) const;
void dump(std::ostringstream& ost, const EventContext& ctx) const;
void dump(std::ostringstream& ost) const override;
void dump(std::ostringstream& ost, const EventContext& ctx) const override;
private:
......
......@@ -9,6 +9,10 @@ find_package(CLHEP REQUIRED)
find_package(GSL REQUIRED)
find_package(PythonLibs)
find_package(RELAX)
find_package(TBB)
# Hide some Boost/ROOT/CLHEP/TBB compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
if(NOT CMAKE_VERSION VERSION_LESS 3.1)
# FindOpenCL.cmake has been introduced in CMake 3.1.0
......
......@@ -4,6 +4,10 @@ gaudi_depends_on_subdirs(GaudiAlg)
find_package(CLHEP REQUIRED)
find_package(GSL REQUIRED)
find_package(ROOT)
# Hide some CLHEP/ROOT compile time warnings
include_directories(SYSTEM ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS})
#---Libraries---------------------------------------------------------------
gaudi_add_library(GaudiGSLLib src/Lib/*.cpp
......
......@@ -9,6 +9,14 @@
// ============================================================================
#include "GaudiKernel/Kernel.h"
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Genfun // due to CLHEP
{
namespace GaudiMathImplementation
......@@ -72,6 +80,12 @@ namespace Genfun // due to CLHEP
} // end of namespace GaudiMathImplementation
} // end of namespace Genfun
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
// ============================================================================
// The END
// ============================================================================
......
......@@ -13,6 +13,14 @@
// ============================================================================
#include "GaudiKernel/Kernel.h"
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace AIDA { class IFunction ; }
namespace Genfun
......@@ -274,6 +282,11 @@ namespace Genfun
} // end of namespace GaudiMathImeplementation
} // end of namespace Genfun
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
#endif // GAUDIMATH_FUNADAPTERS_H
// ============================================================================
......@@ -22,6 +22,14 @@
// ============================================================================
#include "GaudiKernel/Kernel.h"
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Genfun
{
namespace GaudiMathImplementation
......@@ -150,5 +158,11 @@ namespace Genfun
} // end of namespace GaudiMath Implemnentation
} // end of namespace Genfun
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
#endif // GAUDIMATH_GSLFUNADAPTERS_H
// ============================================================================
......@@ -21,6 +21,14 @@
// ============================================================================
#include "gsl/gsl_integration.h"
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Genfun
{
namespace GaudiMathImplementation
......@@ -418,6 +426,12 @@ namespace Genfun
} // end of namespace GaudiMathImplementation
} // end of namespace Genfun
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
// ============================================================================
// The END
// ============================================================================
......
......@@ -12,6 +12,14 @@
#include "CLHEP/GenericFunctions/AbsFunction.hh"
// ============================================================================
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
namespace Genfun
{
namespace GaudiMathImplementation
......@@ -150,6 +158,12 @@ namespace Genfun
} // end of namespace GaudiMathImplementation
} // end of namespace GenFun
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
// ============================================================================
// The END
// ============================================================================
......
......@@ -22,6 +22,14 @@
#include "gsl/gsl_integration.h"
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
/// forward declaration
namespace Genfun
......@@ -393,6 +401,12 @@ namespace Genfun
} // end of namespace GaudiMathImplementation
} // end of namespace Genfun
#if defined(__clang__) || defined(__cling__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic pop
#endif
// ============================================================================
// The END
// ============================================================================
......
#ifndef GAUDIGSL_GAUDIGSLMATH_H
#ifndef GAUDIGSL_GAUDIGSLMATH_H
#define GAUDIGSL_GAUDIGSLMATH_H 1
// this trick defines the macro '__cling__' only when this header is processed
// by cling parser, while it is not set when we compile the .cpp of the
// dictionary (which is processed by the actual compiler)
#if ! defined(G__DICTIONARY) && ! defined(__cling__)
#define __cling__
#define __cling__defined_in_GAUDIGSLMATH_H
#endif
// ============================================================================
// Include files
// ============================================================================
......@@ -14,8 +23,13 @@
#include "GaudiMath/GaudiMath.h"
// ============================================================================
#ifdef __cling__defined_in_GAUDIGSLMATH_H
#undef __cling__
#undef __cling__defined_in_GAUDIGSLMATH_H
#endif
// ============================================================================
// The
// The
// ============================================================================
#endif // GAUDIGSL_GAUDIGSLMATH_H
// ============================================================================
......@@ -14,8 +14,8 @@ if (${APPLE})
set (LIBRT_NAME "")
endif (${APPLE})
# Hide some Boost compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
# Hide some Boost/TBB compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
#---Libraries---------------------------------------------------------------
gaudi_add_module(GaudiHive
......
......@@ -28,16 +28,16 @@ public:
IOBoundAlgSchedulerSvc( const std::string& name, ISvcLocator* svc );
/// Destructor
~IOBoundAlgSchedulerSvc();
~IOBoundAlgSchedulerSvc() override;
/// Initialise
virtual StatusCode initialize();
StatusCode initialize() override;
/// Finalise
virtual StatusCode finalize();
StatusCode finalize() override;
/// Add an algorithm to local queue to run on accelerator
virtual StatusCode push(IAlgTask& task);
StatusCode push(IAlgTask& task) override;
private:
......
......@@ -33,12 +33,12 @@ public:
m_algoIndex(algoIndex),
m_schedSvc(schedSvc),
m_aess(aem),
m_serviceLocator(svcLocator){};
~IOBoundAlgTask() {};
virtual StatusCode execute();
m_serviceLocator(svcLocator) {}
~IOBoundAlgTask() override {}
virtual StatusCode execute() override;
private:
SmartIF<IAlgorithm> m_algorithm;
EventContext* m_evtCtx;
......
......@@ -4,6 +4,8 @@ find_package(Boost REQUIRED COMPONENTS program_options)
gaudi_depends_on_subdirs(GaudiKernel)
# Hide some Boost/ROOT compile time warnings
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
#---Util Executables--------------------------------------------------------
#set(CMAKE_BUILD_TYPE Release)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment