From 1ee05c3a472bd26f45542b1546931823a0d7b9fd Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Fri, 23 Aug 2013 15:08:36 +0200 Subject: [PATCH] Multiple changes in #include<boost/...> and #include <Eigen/..> to supress compilation warnings --- App/src/TestSpecularMagnetic.cpp | 4 ++++ Core/Algorithms/inc/Beam.h | 5 +++++ Core/Algorithms/inc/SpecularMagnetic.h | 4 ++++ Core/Algorithms/inc/SpecularMatrix.h | 3 +++ Core/Algorithms/src/Beam.cpp | 5 ++++- Core/Algorithms/src/Simulation.cpp | 3 +++ Core/FormFactors/inc/FormFactorFullSphere.h | 2 +- Core/Geometry/inc/ITransform3D.h | 3 +++ Core/Samples/inc/HomogeneousMagneticMaterial.h | 4 +++- Core/Samples/inc/IMaterial.h | 4 ++++ Core/Samples/src/MaterialManager.cpp | 4 ++++ .../inc/DoubleToComplexInterpolatingFunction.h | 4 ++++ Core/Tools/inc/IObserver.h | 4 ++++ Core/Tools/inc/ISingleton.h | 4 ++++ Core/Tools/inc/MessageService.h | 1 - Core/Tools/inc/OutputDataIOFactory.h | 4 ++++ Core/Tools/inc/ProgramOptions.h | 4 +++- Core/Tools/inc/Utils.h | 5 +++++ Core/Tools/src/CoreOptionsDescription.cpp | 2 -- .../src/DoubleToComplexInterpolatingFunction.cpp | 1 - Core/Tools/src/MessageService.cpp | 3 +++ Core/Tools/src/OutputDataReadStrategy.cpp | 8 ++++---- Core/Tools/src/ParameterPool.cpp | 4 +++- Core/Tools/src/ProgramOptions.cpp | 4 +++- Core/Tools/src/Utils.cpp | 6 +++++- shared.pri | 14 ++++++++------ 26 files changed, 88 insertions(+), 21 deletions(-) diff --git a/App/src/TestSpecularMagnetic.cpp b/App/src/TestSpecularMagnetic.cpp index d854f516f96..7b97e22008c 100644 --- a/App/src/TestSpecularMagnetic.cpp +++ b/App/src/TestSpecularMagnetic.cpp @@ -18,7 +18,11 @@ #include "SampleFactory.h" #include "Units.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/Core> +GCC_DIAG_ON(unused-local-typedefs); + #include "TCanvas.h" #include "TGraph.h" #include "DrawHelper.h" diff --git a/Core/Algorithms/inc/Beam.h b/Core/Algorithms/inc/Beam.h index f91504f4238..9617ecbc5c5 100644 --- a/Core/Algorithms/inc/Beam.h +++ b/Core/Algorithms/inc/Beam.h @@ -21,7 +21,12 @@ #include "IParameterized.h" #ifndef GCCXML_SKIP_THIS + +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/Core> +GCC_DIAG_ON(unused-local-typedefs); + #endif //! Ideal collimated Beam defined by wavelength, direction and intensity. diff --git a/Core/Algorithms/inc/SpecularMagnetic.h b/Core/Algorithms/inc/SpecularMagnetic.h index 94b3433d6e5..738d9620616 100644 --- a/Core/Algorithms/inc/SpecularMagnetic.h +++ b/Core/Algorithms/inc/SpecularMagnetic.h @@ -20,7 +20,11 @@ #include "ISimulation.h" #include "MultiLayer.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/Core> +GCC_DIAG_ON(unused-local-typedefs); + //! Implements the matrix formalism for the calculation of wave amplitudes of //! the coherent wave solution in a multilayer with magnetization diff --git a/Core/Algorithms/inc/SpecularMatrix.h b/Core/Algorithms/inc/SpecularMatrix.h index 3d9785325e6..8c7f7ba111d 100644 --- a/Core/Algorithms/inc/SpecularMatrix.h +++ b/Core/Algorithms/inc/SpecularMatrix.h @@ -20,7 +20,10 @@ #include "ISimulation.h" #include "MultiLayer.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/Core> +GCC_DIAG_ON(unused-local-typedefs); //! Implements the matrix formalism for the calculation of wave amplitudes of //! the coherent wave solution in a multilayer diff --git a/Core/Algorithms/src/Beam.cpp b/Core/Algorithms/src/Beam.cpp index 3a103764a4c..59c746f772d 100644 --- a/Core/Algorithms/src/Beam.cpp +++ b/Core/Algorithms/src/Beam.cpp @@ -15,8 +15,11 @@ #include "Beam.h" #include "Exceptions.h" - +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/LU> +GCC_DIAG_ON(unused-local-typedefs); + Beam::Beam() : m_central_k(), m_intensity(1.0) { diff --git a/Core/Algorithms/src/Simulation.cpp b/Core/Algorithms/src/Simulation.cpp index 8e156154cef..4cb8199ae79 100644 --- a/Core/Algorithms/src/Simulation.cpp +++ b/Core/Algorithms/src/Simulation.cpp @@ -20,7 +20,10 @@ #include "DWBASimulation.h" #include "MessageService.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/thread.hpp> +GCC_DIAG_ON(unused-local-typedefs); #include <gsl/gsl_errno.h> Simulation::Simulation() diff --git a/Core/FormFactors/inc/FormFactorFullSphere.h b/Core/FormFactors/inc/FormFactorFullSphere.h index 807861f0f90..7317c9c70bd 100644 --- a/Core/FormFactors/inc/FormFactorFullSphere.h +++ b/Core/FormFactors/inc/FormFactorFullSphere.h @@ -21,7 +21,7 @@ //! Formfactor of a sphere. -class FormFactorFullSphere : public IFormFactorBorn +class BA_CORE_API_ FormFactorFullSphere : public IFormFactorBorn { public: FormFactorFullSphere(double radius); diff --git a/Core/Geometry/inc/ITransform3D.h b/Core/Geometry/inc/ITransform3D.h index 5c70797a281..7594abd5748 100644 --- a/Core/Geometry/inc/ITransform3D.h +++ b/Core/Geometry/inc/ITransform3D.h @@ -17,7 +17,10 @@ #include "Types.h" #include "BasicVector3D.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/shared_ptr.hpp> +GCC_DIAG_ON(unused-local-typedefs); namespace Geometry { diff --git a/Core/Samples/inc/HomogeneousMagneticMaterial.h b/Core/Samples/inc/HomogeneousMagneticMaterial.h index 5dc32985d2c..a68408a4605 100644 --- a/Core/Samples/inc/HomogeneousMagneticMaterial.h +++ b/Core/Samples/inc/HomogeneousMagneticMaterial.h @@ -17,8 +17,10 @@ #define HOMOGENEOUSMAGNETICMATERIAL_H_ #include "HomogeneousMaterial.h" - +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/Core> +GCC_DIAG_ON(unused-local-typedefs); //! An homogeneous material with magnetization diff --git a/Core/Samples/inc/IMaterial.h b/Core/Samples/inc/IMaterial.h index c30ac9254f4..829c82c4c2e 100644 --- a/Core/Samples/inc/IMaterial.h +++ b/Core/Samples/inc/IMaterial.h @@ -21,7 +21,11 @@ #include <string> #include <iostream> + +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <Eigen/Core> +GCC_DIAG_ON(unused-local-typedefs); //! Interface to a named material. diff --git a/Core/Samples/src/MaterialManager.cpp b/Core/Samples/src/MaterialManager.cpp index 5845bbd80b8..ce0c3621016 100644 --- a/Core/Samples/src/MaterialManager.cpp +++ b/Core/Samples/src/MaterialManager.cpp @@ -18,7 +18,11 @@ #include "HomogeneousMagneticMaterial.h" #include "Exceptions.h" #include "MessageService.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/thread.hpp> +GCC_DIAG_ON(unused-local-typedefs); + //! Materials database type. diff --git a/Core/Tools/inc/DoubleToComplexInterpolatingFunction.h b/Core/Tools/inc/DoubleToComplexInterpolatingFunction.h index 21a288f2521..752911b0e78 100644 --- a/Core/Tools/inc/DoubleToComplexInterpolatingFunction.h +++ b/Core/Tools/inc/DoubleToComplexInterpolatingFunction.h @@ -18,7 +18,11 @@ #include "IDoubleToComplexFunction.h" #include <map> +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/unordered_map.hpp> +GCC_DIAG_ON(unused-local-typedefs); + class DoubleToComplexInterpolatingFunction : public IDoubleToComplexFunction { diff --git a/Core/Tools/inc/IObserver.h b/Core/Tools/inc/IObserver.h index 2dc717bd034..d908e6498e2 100644 --- a/Core/Tools/inc/IObserver.h +++ b/Core/Tools/inc/IObserver.h @@ -18,7 +18,11 @@ #include "Exceptions.h" #include <list> +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/shared_ptr.hpp> +GCC_DIAG_ON(unused-local-typedefs); + class IObservable; diff --git a/Core/Tools/inc/ISingleton.h b/Core/Tools/inc/ISingleton.h index ddf354f6721..9e05e171a7e 100644 --- a/Core/Tools/inc/ISingleton.h +++ b/Core/Tools/inc/ISingleton.h @@ -19,7 +19,11 @@ #include <stdexcept> #include <iostream> #include <typeinfo> +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/thread.hpp> +GCC_DIAG_ON(unused-local-typedefs); + template <class T> class ISingleton diff --git a/Core/Tools/inc/MessageService.h b/Core/Tools/inc/MessageService.h index 3c4fda4cc8d..7330f1be9ee 100644 --- a/Core/Tools/inc/MessageService.h +++ b/Core/Tools/inc/MessageService.h @@ -6,7 +6,6 @@ #include <string> #include <vector> #include <iomanip> -//#include <boost/thread.hpp> //! Sets of logging utilities diff --git a/Core/Tools/inc/OutputDataIOFactory.h b/Core/Tools/inc/OutputDataIOFactory.h index 1ab0e621605..da23e673141 100644 --- a/Core/Tools/inc/OutputDataIOFactory.h +++ b/Core/Tools/inc/OutputDataIOFactory.h @@ -20,7 +20,11 @@ #include "OutputDataReader.h" #include "OutputDataWriter.h" #include <string> +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/shared_ptr.hpp> +GCC_DIAG_ON(unused-local-typedefs); + //! Reads OutputData from files in different format diff --git a/Core/Tools/inc/ProgramOptions.h b/Core/Tools/inc/ProgramOptions.h index 81bee224f82..5ff5a9902a5 100644 --- a/Core/Tools/inc/ProgramOptions.h +++ b/Core/Tools/inc/ProgramOptions.h @@ -18,10 +18,12 @@ #include "Macros.h" GCC_DIAG_OFF(unused-parameter); +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/program_options/options_description.hpp> #include <boost/program_options/positional_options.hpp> -GCC_DIAG_ON(unused-parameter); #include <boost/program_options/variables_map.hpp> +GCC_DIAG_ON(unused-parameter); +GCC_DIAG_ON(unused-local-typedefs); #include <string> diff --git a/Core/Tools/inc/Utils.h b/Core/Tools/inc/Utils.h index 00dc9734a78..049595dcfaa 100644 --- a/Core/Tools/inc/Utils.h +++ b/Core/Tools/inc/Utils.h @@ -19,7 +19,12 @@ #include "WinDllMacros.h" #include "Types.h" #include "Exceptions.h" + +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/unordered_map.hpp> +GCC_DIAG_ON(unused-local-typedefs); + #include <map> namespace Utils { diff --git a/Core/Tools/src/CoreOptionsDescription.cpp b/Core/Tools/src/CoreOptionsDescription.cpp index 3a1c2fa9f49..140773aa9e8 100644 --- a/Core/Tools/src/CoreOptionsDescription.cpp +++ b/Core/Tools/src/CoreOptionsDescription.cpp @@ -16,8 +16,6 @@ #include "CoreOptionsDescription.h" #include "ProgramOptions.h" -#include <boost/program_options/options_description.hpp> - namespace bpo = boost::program_options; //! Adds command line and config file options diff --git a/Core/Tools/src/DoubleToComplexInterpolatingFunction.cpp b/Core/Tools/src/DoubleToComplexInterpolatingFunction.cpp index 16e8394bd39..e2361ad825e 100644 --- a/Core/Tools/src/DoubleToComplexInterpolatingFunction.cpp +++ b/Core/Tools/src/DoubleToComplexInterpolatingFunction.cpp @@ -16,7 +16,6 @@ #include "DoubleToComplexInterpolatingFunction.h" #include "Exceptions.h" #include <sstream> -#include <boost/unordered_map.hpp> DoubleToComplexInterpolatingFunction::~DoubleToComplexInterpolatingFunction() { diff --git a/Core/Tools/src/MessageService.cpp b/Core/Tools/src/MessageService.cpp index 4138cbe574b..822f12763f1 100644 --- a/Core/Tools/src/MessageService.cpp +++ b/Core/Tools/src/MessageService.cpp @@ -1,5 +1,8 @@ #include "MessageService.h" +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/assign/list_of.hpp> +GCC_DIAG_ON(unused-local-typedefs); #include "Exceptions.h" #include <sys/time.h> #include <cstdio> diff --git a/Core/Tools/src/OutputDataReadStrategy.cpp b/Core/Tools/src/OutputDataReadStrategy.cpp index 42a9898529e..6a16896c08e 100644 --- a/Core/Tools/src/OutputDataReadStrategy.cpp +++ b/Core/Tools/src/OutputDataReadStrategy.cpp @@ -26,15 +26,15 @@ #include <iomanip> #include <cmath> #include <algorithm> - +#include "Macros.h" +GCC_DIAG_OFF(unused-parameter); +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/filtering_stream.hpp> #include <boost/iostreams/copy.hpp> - -#include "Macros.h" -GCC_DIAG_OFF(unused-parameter); #include <boost/iostreams/filter/gzip.hpp> #include <string> +GCC_DIAG_ON(unused-local-typedefs); GCC_DIAG_ON(unused-parameter); diff --git a/Core/Tools/src/ParameterPool.cpp b/Core/Tools/src/ParameterPool.cpp index 950d2cc8daa..185bd5f8c27 100644 --- a/Core/Tools/src/ParameterPool.cpp +++ b/Core/Tools/src/ParameterPool.cpp @@ -17,8 +17,10 @@ #include "Exceptions.h" #include "Utils.h" #include "MessageService.h" - +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/algorithm/string/replace.hpp> +GCC_DIAG_ON(unused-local-typedefs); #include <iostream> #include <sstream> diff --git a/Core/Tools/src/ProgramOptions.cpp b/Core/Tools/src/ProgramOptions.cpp index 42d38c4d765..bab0b3b34aa 100644 --- a/Core/Tools/src/ProgramOptions.cpp +++ b/Core/Tools/src/ProgramOptions.cpp @@ -16,9 +16,11 @@ #include "ProgramOptions.h" #include "Utils.h" #include "MessageService.h" - +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/program_options/config.hpp> #include <boost/program_options/parsers.hpp> +GCC_DIAG_ON(unused-local-typedefs); #include <iostream> #include <fstream> diff --git a/Core/Tools/src/Utils.cpp b/Core/Tools/src/Utils.cpp index 8ffb94eba8d..9ab51f3469c 100644 --- a/Core/Tools/src/Utils.cpp +++ b/Core/Tools/src/Utils.cpp @@ -15,11 +15,15 @@ #include "Utils.h" #include "Exceptions.h" +#include <iomanip> + +#include "Macros.h" +GCC_DIAG_OFF(unused-local-typedefs); #include <boost/regex.hpp> #include <boost/algorithm/string/replace.hpp> #include <boost/filesystem.hpp> -#include <iomanip> #include <boost/algorithm/string.hpp> +GCC_DIAG_ON(unused-local-typedefs); #ifdef DEBUG_FPE #include <fenv.h> diff --git a/shared.pri b/shared.pri index 1522cf4785a..d94d91e56ad 100644 --- a/shared.pri +++ b/shared.pri @@ -2,7 +2,7 @@ # Common settings for all BornAgain compilations # ----------------------------------------------------------------------------- -CONFIG += BORNAGAIN_PYTHON # provide python bindings compilation +#CONFIG += BORNAGAIN_PYTHON # provide python bindings compilation win32 { MAKE_COMMAND = mingw32-make @@ -90,16 +90,18 @@ INCLUDEPATH *= $${EIGEN_INCLUDE} FFTW3_HEADERFILE = fftw3.h macx|unix { FFTW3_HEADER_LOCATIONS = /opt/local/include /usr/local/include /usr/include + FFTW3_LIBNAME = fftw3 } win32 { FFTW3_HEADER_LOCATIONS = "C:/Program Files (x86)/Libraries/fftw-3.3.3-dll32/include" + FFTW3_LIBNAME = fftw3-3 } for(dir, FFTW3_HEADER_LOCATIONS): isEmpty(FFTW3_INCLUDE): exists($${dir}/$${FFTW3_HEADERFILE}): FFTW3_INCLUDE = $${dir} isEmpty(FFTW3_INCLUDE): message("Can't find" $${FFTW3_HEADERFILE} "in" $${FFTW3_HEADER_LOCATIONS}) FFTW3_LIB = $$replace(FFTW3_INCLUDE,"include","lib") INCLUDEPATH *= $${FFTW3_INCLUDE} LIBS *= -L$${FFTW3_LIB} -LIBS += -lfftw3 +LIBS += -l$${FFTW3_LIBNAME} # --- checking boost --- BOOST_HEADERFILE = boost/version.hpp @@ -286,10 +288,10 @@ CONFIG(BORNAGAIN_PYTHON) { pythonsysincdir=$${WhichPython}/include pythonsyslibdir=$${WhichPython}/libs } - #message(we have python) - #message($$pythonvers) - #message($$pythonsysincdir) - #message($$pythonsyslibdir) + message(we have python) + message($$pythonvers) + message($$pythonsysincdir) + message($$pythonsyslibdir) lessThan(pythonvers, 2.6): error("BornAgain requires python 2.6 or greater") INCLUDEPATH += $$pythonsysincdir #LIBS += -L$$pythonsyslibdir -lpython$$pythonvers -lboost_python -- GitLab