From e3469291fc10e5714fc758c99c752832dfdae685 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Tue, 17 Dec 2024 16:54:57 -0500 Subject: [PATCH] Switch to generated DllConfig.h --- Framework/SINQ/CMakeLists.txt | 9 +++++++- Framework/SINQ/inc/MantidSINQ/DllConfig.h | 21 ------------------- .../SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h | 2 -- .../SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h | 2 -- .../SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h | 1 - .../SINQ/inc/MantidSINQ/PoldiPeakSearch.h | 1 - .../SINQ/inc/MantidSINQ/PoldiTruncateData.h | 2 +- .../PoldiUtilities/Poldi2DFunction.h | 1 - .../PoldiUtilities/PoldiAutoCorrelationCore.h | 2 -- .../PoldiUtilities/PoldiBasicChopper.h | 2 -- .../PoldiUtilities/PoldiChopperFactory.h | 2 -- .../PoldiUtilities/PoldiDeadWireDecorator.h | 2 -- .../PoldiUtilities/PoldiDetectorDecorator.h | 1 - .../PoldiUtilities/PoldiInstrumentAdapter.h | 1 - .../PoldiUtilities/PoldiTimeTransformer.h | 1 - .../CMake/CppCheck_Suppressions.txt.in | 14 ++++++------- 16 files changed, 16 insertions(+), 48 deletions(-) delete mode 100644 Framework/SINQ/inc/MantidSINQ/DllConfig.h diff --git a/Framework/SINQ/CMakeLists.txt b/Framework/SINQ/CMakeLists.txt index 771e07f74cf9..3316619fef1e 100644 --- a/Framework/SINQ/CMakeLists.txt +++ b/Framework/SINQ/CMakeLists.txt @@ -1,3 +1,5 @@ +include(GenerateExportHeader) + set(SRC_FILES src/InvertMDDim.cpp src/LoadFlexiNexus.cpp @@ -41,7 +43,6 @@ set(SRC_FILES ) set(INC_FILES - inc/MantidSINQ/DllConfig.h inc/MantidSINQ/InvertMDDim.h inc/MantidSINQ/LoadFlexiNexus.h inc/MantidSINQ/MDHistoToWorkspace2D.h @@ -154,6 +155,12 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set_target_properties(SINQ PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif() +# Auto-generate exports header +target_include_directories( + SINQ PUBLIC $ $ +) +generate_mantid_export_header(SINQ False) + # Add to the 'Framework' group in VS set_property(TARGET SINQ PROPERTY FOLDER "MantidFramework") diff --git a/Framework/SINQ/inc/MantidSINQ/DllConfig.h b/Framework/SINQ/inc/MantidSINQ/DllConfig.h deleted file mode 100644 index afd1a6dccace..000000000000 --- a/Framework/SINQ/inc/MantidSINQ/DllConfig.h +++ /dev/null @@ -1,21 +0,0 @@ -// Mantid Repository : https://github.com/mantidproject/mantid -// -// Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source, -// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS -// SPDX - License - Identifier: GPL - 3.0 + -#pragma once - -/* - This file contains the DLLExport/DLLImport linkage configuration for the - SINQ library -*/ -#include "MantidKernel/System.h" - -#ifdef IN_MANTID_SINQ -#define MANTID_SINQ_DLL DLLExport -#define EXTERN_MANTID_SINQ -#else -#define MANTID_SINQ_DLL DLLImport -#define EXTERN_MANTID_SINQ EXTERN_IMPORT -#endif /* IN_MANTID_SINQ */ diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h index a02768ad2a7d..1f58b87f478a 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h @@ -7,8 +7,6 @@ #pragma once #include "MantidAPI/Algorithm.h" -#include "MantidKernel/System.h" - #include "MantidAPI/IPeakFunction.h" #include "MantidAPI/TableRow.h" #include "MantidDataObjects/TableWorkspace.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h index 7bf46ee540b9..2304e919b18f 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h @@ -7,8 +7,6 @@ #pragma once #include "MantidAPI/Algorithm.h" -#include "MantidKernel/System.h" - #include "MantidAPI/IPeakFunction.h" #include "MantidAPI/TableRow.h" #include "MantidAPI/WorkspaceGroup_fwd.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h index fe7b4182e77c..0b64749f868d 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h @@ -10,7 +10,6 @@ #include "MantidAPI/IFunction.h" #include "MantidAPI/IPeakFunction.h" #include "MantidGeometry/Crystal/PointGroup.h" -#include "MantidKernel/System.h" #include "MantidSINQ/DllConfig.h" #include "MantidKernel/Matrix.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h b/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h index 1ac2c5122987..d2a4650c9acf 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h @@ -9,7 +9,6 @@ #include "MantidSINQ/DllConfig.h" #include "MantidAPI/Algorithm.h" -#include "MantidKernel/System.h" #include "MantidKernel/Unit.h" #include "MantidKernel/V2D.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h b/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h index 7ea728df650e..e6a3805cb98f 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h @@ -7,7 +7,7 @@ #pragma once #include "MantidAPI/Algorithm.h" -#include "MantidKernel/System.h" +#include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h index 4a8dab212a5a..a2cf25d02726 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h @@ -8,7 +8,6 @@ #include "MantidAPI/CompositeFunction.h" #include "MantidAPI/IFunction1DSpectrum.h" -#include "MantidKernel/System.h" #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/IPoldiFunction1D.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h index ce9d139b3b87..03a082ce8d52 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h @@ -6,8 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" - #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h index 4d0f8b11ae01..28665e98b7ac 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h @@ -6,8 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" - #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h index fb82413d7e0e..9d771e38d257 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h @@ -6,8 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" - #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h index 5da4ad81c35c..eac0c581dc71 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h @@ -6,8 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" - #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h index 85285a22a238..99e8d16e1a31 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h @@ -6,7 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiAbstractDetector.h" diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h index e9ff0a6314ef..4465e063dd4c 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h @@ -9,7 +9,6 @@ #include "MantidAPI/MatrixWorkspace_fwd.h" #include "MantidAPI/Run.h" #include "MantidGeometry/Instrument.h" -#include "MantidKernel/System.h" #include "MantidSINQ/DllConfig.h" #include diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h index dd0f88e69e17..8775c1a3e942 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h @@ -6,7 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" #include "MantidSINQ/DllConfig.h" #include "MantidSINQ/PoldiUtilities/PoldiConversions.h" #include "MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h" diff --git a/buildconfig/CMake/CppCheck_Suppressions.txt.in b/buildconfig/CMake/CppCheck_Suppressions.txt.in index 71caf68a787a..e24ff56a1e6b 100644 --- a/buildconfig/CMake/CppCheck_Suppressions.txt.in +++ b/buildconfig/CMake/CppCheck_Suppressions.txt.in @@ -966,10 +966,10 @@ constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/Reflectometry/src/Reflectomet missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiCreatePeaksFromCell.h:31 constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/PoldiCreatePeaksFromCell.cpp:49 constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/PoldiCreatePeaksFromCell.cpp:83 -virtualCallInConstructor:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h:49 +virtualCallInConstructor:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h:48 constParameterReference:${CMAKE_SOURCE_DIR}/Framework/Reflectometry/src/SpecularReflectionPositionCorrect2.cpp:194 -virtualCallInConstructor:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h:46 -returnByReference:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h:40 +virtualCallInConstructor:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h:44 +returnByReference:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h:38 constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/Reflectometry/src/ReflectometryWorkflowBase2.cpp:408 constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/Reflectometry/src/ReflectometryWorkflowBase2.cpp:632 constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/Reflectometry/src/ReflectometryWorkflowBase2.cpp:637 @@ -988,14 +988,14 @@ returnByReference:${CMAKE_SOURCE_DIR}/Framework/TestHelpers/inc/MantidFrameworkT returnDanglingLifetime:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/PoldiPeakSearch.cpp:125 missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiAnalyseResiduals.h:29 constParameterPointer:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/PoldiUtilities/PoldiInstrumentAdapter.cpp:258 -missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h:40 +missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h:39 missingOverride:${CMAKE_SOURCE_DIR}/Testing/Tools/cxxtest/cxxtest/GlobalFixture.h:22 passedByValue:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/PoldiPeakSearch.cpp:183 -missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h:67 -returnByReference:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h:39 +missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h:65 +returnByReference:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h:37 passedByValue:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/SliceMDHisto.cpp:95 constVariableReference:${CMAKE_SOURCE_DIR}/Framework/SINQ/src/PoldiFitPeaks1D2.cpp:205 -missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h:30 +missingOverride:${CMAKE_SOURCE_DIR}/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h:28 uselessOverride:${CMAKE_SOURCE_DIR}/Framework/TestHelpers/inc/MantidFrameworkTestHelpers/FakeObjects.h:598 knownConditionTrueFalse:${CMAKE_SOURCE_DIR}/Framework/TestHelpers/inc/MantidFrameworkTestHelpers/FakeObjects.h:152 constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp:99