diff --git a/Framework/Kernel/CMakeLists.txt b/Framework/Kernel/CMakeLists.txt index 44bab995da85405a5564c820cdccb014e911cc6a..c0e2c23c9c64dee0c9029dd35275fd77efb64468 100644 --- a/Framework/Kernel/CMakeLists.txt +++ b/Framework/Kernel/CMakeLists.txt @@ -476,7 +476,7 @@ add_library ( Kernel ${SRC_FILES} ${INC_FILES} ) set_target_properties ( Kernel PROPERTIES OUTPUT_NAME MantidKernel COMPILE_DEFINITIONS "IN_MANTID_KERNEL;PSAPI_VERSION=1" ) -target_include_directories ( Kernel PUBLIC ${EIGEN3_INCLUDE_DIR} PRIVATE ${GSL_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) +target_include_directories ( Kernel SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR} PRIVATE ${GSL_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) if (OSX_VERSION VERSION_GREATER 10.8) set_target_properties ( Kernel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") diff --git a/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h b/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h index 0c56168c73339a2db054bed0851bcc7e04d312a5..3ba554a9bdc20a79ad95833c22b574377bc5ff77 100644 --- a/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h +++ b/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h @@ -99,11 +99,11 @@ private: // NearestNeighbours implementation //------------------------------------------------------------------------------ -template <size_t N = 3> class DLLExport NearestNeighbours { +template <int N = 3> class DLLExport NearestNeighbours { public: // typedefs for code brevity - typedef Eigen::Matrix<double, N, 1ul> VectorType; + typedef Eigen::Matrix<double, N, 1> VectorType; typedef std::vector<std::tuple<VectorType, size_t, double>> NearestNeighbourResults; diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp index a9241c8b0730bc0efe2ec30bdcad40ebb7603789..6087ec21561b52dd664936cfc1d0be4bc8e78dfc 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp @@ -1,9 +1,10 @@ -#include "MantidAPI/Axis.h" #include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/Axis.h" #include "MantidAPI/Run.h" #include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/WorkspaceOpOverloads.h" #include "MantidGeometry/IDetector.h" +#include "MantidKernel/WarningSuppressions.h" #include "MantidPythonInterface/api/CloneMatrixWorkspace.h" #include "MantidPythonInterface/kernel/GetPointer.h" @@ -47,9 +48,13 @@ typedef return_value_policy<VectorRefToNumpy<WrapReadWrite>> #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) // Overloads for binIndexOf function which has 1 optional argument BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(MatrixWorkspace_binIndexOfOverloads, MatrixWorkspace::binIndexOf, 1, 2) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp index 9f6ec9a1ecfa8dc11fb1a2b1e1572becedee08f7..9a7ab9422ea6f7a2b16c76c0501a4c0f5b0e4942 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp @@ -1,5 +1,6 @@ #include "MantidAPI/Run.h" #include "MantidGeometry/Instrument/Goniometer.h" +#include "MantidKernel/WarningSuppressions.h" #include "MantidPythonInterface/kernel/GetPointer.h" #include "MantidPythonInterface/kernel/Registry/PropertyWithValueFactory.h" @@ -119,8 +120,12 @@ bpl::list keys(Run &self) { #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(integrateProtonCharge_Overload, integrateProtonCharge, 0, 1) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp index 8eee968eff4e60007bf8587ab3a61d2e9afa757c..68a4e2a8e2c551e5a65f975cfd264aea56c362f4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp @@ -1,5 +1,6 @@ #include "MantidAPI/Workspace.h" #include "MantidAPI/WorkspaceHistory.h" +#include "MantidKernel/WarningSuppressions.h" #include "MantidPythonInterface/kernel/GetPointer.h" #include "MantidPythonInterface/kernel/Registry/RegisterWorkspacePtrToPython.h" @@ -23,8 +24,12 @@ namespace { #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Workspace_isDirtyOverloads, Workspace::isDirty, 0, 1) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp index 4766257ed87f48c9f61fc04e8f037685450a6482..0fcdf9243941c89a46c7a1ce2fe83d1f42884441 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp @@ -1,8 +1,9 @@ -#include "MantidAPI/Axis.h" -#include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/WorkspaceFactory.h" -#include "MantidAPI/ITableWorkspace.h" +#include "MantidAPI/Axis.h" #include "MantidAPI/IPeaksWorkspace.h" +#include "MantidAPI/ITableWorkspace.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidKernel/WarningSuppressions.h" #include "MantidPythonInterface/kernel/GetPointer.h" #include "MantidPythonInterface/kernel/Policies/AsType.h" @@ -50,10 +51,14 @@ Workspace_sptr createFromParentPtr(WorkspaceFactoryImpl &self, #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) BOOST_PYTHON_FUNCTION_OVERLOADS(createFromParent_Overload, createFromParentPtr, 2, 5) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createTable_Overload, createTable, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createPeaks_Overload, createPeaks, 0, 1) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp index d9b646bebd46bb531669c2c51c5ab9ee9fbc388a..c240d2f1b2a27d287fe7b890bfb9235dfdb7705a 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp @@ -1,7 +1,8 @@ #include "MantidGeometry/Instrument/Goniometer.h" +#include "MantidKernel/WarningSuppressions.h" #include "MantidPythonInterface/kernel/Converters/MatrixToNDArray.h" -#include "MantidPythonInterface/kernel/Converters/PyObjectToV3D.h" #include "MantidPythonInterface/kernel/Converters/PyObjectToMatrix.h" +#include "MantidPythonInterface/kernel/Converters/PyObjectToV3D.h" #include "MantidPythonInterface/kernel/Policies/MatrixToNumpy.h" #include <boost/python/class.hpp> @@ -20,9 +21,13 @@ namespace //<unnamed> #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) // define overloaded functions BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getEulerAngles_overloads, Goniometer::getEulerAngles, 0, 1) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp index c1fe18bd3d4343d818a5e754899619a563335da3..c08ed6a80960dc3295a5b1fe54f8207edea660ae 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp @@ -165,9 +165,13 @@ std::vector<double> getModifiedZscoreNumpy(const NumPy::NdArray &data, #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) // Define an overload to handle the default argument BOOST_PYTHON_FUNCTION_OVERLOADS(getModifiedZscoreOverloads, getModifiedZscoreNumpy, 1, 2) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif @@ -226,9 +230,13 @@ std::vector<double> getMomentsAboutOriginNumpy(const NumPy::NdArray &indep, #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion) // Define an overload to handle the default argument BOOST_PYTHON_FUNCTION_OVERLOADS(getMomentsAboutOriginOverloads, getMomentsAboutOriginNumpy, 2, 3) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif @@ -248,9 +256,13 @@ std::vector<double> getMomentsAboutMeanNumpy(const NumPy::NdArray &indep, #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wunused-local-typedef" #endif +// Ignore -Wconversion warnings coming from boost::python +// Seen with GCC 7.1.1 and Boost 1.63.0 +GCC_DIAG_OFF(conversion( // Define an overload to handle the default argument BOOST_PYTHON_FUNCTION_OVERLOADS(getMomentsAboutMeanOverloads, getMomentsAboutMeanNumpy, 2, 3) +GCC_DIAG_ON(conversion) #ifdef __clang__ #pragma clang diagnostic pop #endif