mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
remove boost and tutorial7 -Wshadow warnings and install null deleter file in FairRoot installation
This commit is contained in:
parent
ca7a76110d
commit
a0388c084e
|
@ -36,7 +36,7 @@ set(DEPENDENCIES
|
||||||
pthread
|
pthread
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES logger.h logger_def.h DESTINATION include/logger)
|
install(FILES logger.h logger_def.h fairroot_null_deleter.h DESTINATION include/logger)
|
||||||
|
|
||||||
GENERATE_LIBRARY()
|
GENERATE_LIBRARY()
|
||||||
|
|
||||||
|
|
|
@ -9,16 +9,13 @@
|
||||||
|
|
||||||
#include <boost/log/core/core.hpp>
|
#include <boost/log/core/core.hpp>
|
||||||
#include <boost/log/expressions/formatters/date_time.hpp>
|
#include <boost/log/expressions/formatters/date_time.hpp>
|
||||||
#include <boost/log/expressions.hpp>
|
|
||||||
#include <boost/log/sinks/sync_frontend.hpp>
|
|
||||||
#include <boost/log/sinks/text_ostream_backend.hpp>
|
#include <boost/log/sinks/text_ostream_backend.hpp>
|
||||||
#include <boost/log/sources/severity_logger.hpp>
|
|
||||||
#include <boost/log/support/date_time.hpp>
|
#include <boost/log/support/date_time.hpp>
|
||||||
#include <boost/core/null_deleter.hpp>
|
|
||||||
#include <boost/log/sinks/text_file_backend.hpp>
|
|
||||||
#include <boost/log/utility/setup/common_attributes.hpp>
|
#include <boost/log/utility/setup/common_attributes.hpp>
|
||||||
|
#include <boost/core/null_deleter.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
|
|
|
@ -21,18 +21,50 @@
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
#include <boost/log/sources/global_logger_storage.hpp>
|
||||||
|
#include <boost/log/expressions/attr_fwd.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// WARNING : pragma commands to hide boost Wshadow warning
|
||||||
|
#if defined(__clang__)
|
||||||
|
_Pragma("clang diagnostic push")
|
||||||
|
_Pragma("clang diagnostic ignored \"-Wshadow\"")
|
||||||
// boost
|
// boost
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time_io.hpp>
|
#include <boost/date_time/posix_time/posix_time_io.hpp>
|
||||||
#include <boost/log/sources/global_logger_storage.hpp>
|
|
||||||
#include <boost/log/sources/severity_logger.hpp>
|
#include <boost/log/sources/severity_logger.hpp>
|
||||||
#include <boost/log/utility/formatting_ostream.hpp>
|
#include <boost/log/utility/formatting_ostream.hpp>
|
||||||
#include <boost/log/expressions.hpp>
|
#include <boost/log/expressions.hpp>
|
||||||
#include <boost/log/expressions/attr_fwd.hpp>
|
|
||||||
#include <boost/log/expressions/attr.hpp>
|
#include <boost/log/expressions/attr.hpp>
|
||||||
|
#include <boost/log/utility/formatting_ostream.hpp>
|
||||||
|
#include <boost/log/sinks/text_file_backend.hpp>
|
||||||
|
#include <boost/log/sinks/sync_frontend.hpp>
|
||||||
// fairmq
|
// fairmq
|
||||||
#include "logger_def.h"
|
#include "logger_def.h"
|
||||||
|
_Pragma("clang diagnostic pop")
|
||||||
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||||
|
_Pragma("GCC diagnostic push")
|
||||||
|
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||||
|
// boost
|
||||||
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
|
#include <boost/date_time/posix_time/posix_time_io.hpp>
|
||||||
|
#include <boost/log/sources/severity_logger.hpp>
|
||||||
|
#include <boost/log/utility/formatting_ostream.hpp>
|
||||||
|
#include <boost/log/expressions.hpp>
|
||||||
|
#include <boost/log/expressions/attr.hpp>
|
||||||
|
#include <boost/log/utility/formatting_ostream.hpp>
|
||||||
|
#include <boost/log/sinks/text_file_backend.hpp>
|
||||||
|
#include <boost/log/sinks/sync_frontend.hpp>
|
||||||
|
// fairmq
|
||||||
|
#include "logger_def.h"
|
||||||
|
_Pragma("GCC diagnostic pop")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Note : the following types and values must be defined in the included logger_def.h :
|
// Note : the following types and values must be defined in the included logger_def.h :
|
||||||
// 1- custom_severity_level
|
// 1- custom_severity_level
|
||||||
|
|
|
@ -10,23 +10,19 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
#include "fairroot_null_deleter.h"
|
||||||
|
|
||||||
#include <boost/log/core/core.hpp>
|
#include <boost/log/core/core.hpp>
|
||||||
#include <boost/log/expressions/formatters/date_time.hpp>
|
#include <boost/log/expressions/formatters/date_time.hpp>
|
||||||
#include <boost/log/expressions.hpp>
|
|
||||||
#include <boost/log/sinks/sync_frontend.hpp>
|
|
||||||
#include <boost/log/sinks/text_ostream_backend.hpp>
|
#include <boost/log/sinks/text_ostream_backend.hpp>
|
||||||
#include <boost/log/sources/severity_logger.hpp>
|
|
||||||
#include <boost/log/support/date_time.hpp>
|
#include <boost/log/support/date_time.hpp>
|
||||||
|
|
||||||
#include <boost/log/sinks/text_file_backend.hpp>
|
|
||||||
#include <boost/log/utility/setup/common_attributes.hpp>
|
#include <boost/log/utility/setup/common_attributes.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
#include "fairroot_null_deleter.h"
|
|
||||||
|
|
||||||
namespace logging = boost::log;
|
namespace logging = boost::log;
|
||||||
namespace src = boost::log::sources;
|
namespace src = boost::log::sources;
|
||||||
|
|
|
@ -6,7 +6,20 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include "logger.h"
|
// WARNING : pragma commands to hide boost warning
|
||||||
|
// TODO : remove these pragma commands when boost will fix this issue in future release
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
_Pragma("clang diagnostic push")
|
||||||
|
_Pragma("clang diagnostic ignored \"-Wshadow\"")
|
||||||
|
#include "logger.h"
|
||||||
|
_Pragma("clang diagnostic pop")
|
||||||
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||||
|
_Pragma("GCC diagnostic push")
|
||||||
|
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||||
|
#include "logger.h"
|
||||||
|
_Pragma("GCC diagnostic pop")
|
||||||
|
#endif
|
||||||
|
|
||||||
void test_logger()
|
void test_logger()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,12 +15,24 @@
|
||||||
#include "FairMQParser.h"
|
#include "FairMQParser.h"
|
||||||
#include "FairMQLogger.h"
|
#include "FairMQLogger.h"
|
||||||
#include <boost/property_tree/xml_parser.hpp>
|
#include <boost/property_tree/xml_parser.hpp>
|
||||||
|
|
||||||
// WARNING : pragma commands to hide boost (1.54.0) warning
|
// WARNING : pragma commands to hide boost (1.54.0) warning
|
||||||
// TODO : remove these pragma commands when boost will fix this issue in future release
|
// TODO : remove these pragma commands when boost will fix this issue in future release
|
||||||
#pragma clang diagnostic push
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic ignored "-Wshadow"
|
_Pragma("clang diagnostic push")
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
_Pragma("clang diagnostic ignored \"-Wshadow\"")
|
||||||
#pragma clang diagnostic pop
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
_Pragma("clang diagnostic pop")
|
||||||
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||||
|
_Pragma("GCC diagnostic push")
|
||||||
|
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||||
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
_Pragma("GCC diagnostic pop")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace FairMQParser
|
namespace FairMQParser
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user