CMakeLists.txt 13.4 KB
Newer Older
1
# GLOBs should be replaced with explicit listings
2
3
4
set(SRC_FILES
    src/AccumulateMD.cpp
    src/AndMD.cpp
5
    src/ApplyDetailedBalanceMD.cpp
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    src/BaseConvertToDiffractionMDWorkspace.cpp
    src/BinMD.cpp
    src/BinaryOperationMD.cpp
    src/BooleanBinaryOperationMD.cpp
    src/CalculateCoverageDGS.cpp
    src/CentroidPeaksMD.cpp
    src/CentroidPeaksMD2.cpp
    src/ChangeQConvention.cpp
    src/CloneMDWorkspace.cpp
    src/CompactMD.cpp
    src/CompareMDWorkspaces.cpp
    src/ConvToMDBase.cpp
    src/ConvToMDEventsWS.cpp
    src/ConvToMDEventsWSIndexing.cpp
    src/ConvToMDHistoWS.cpp
    src/ConvToMDSelector.cpp
    src/ConvertCWPDMDToSpectra.cpp
    src/ConvertCWSDExpToMomentum.cpp
    src/ConvertCWSDMDtoHKL.cpp
    src/ConvertMDHistoToMatrixWorkspace.cpp
    src/ConvertSpiceDataToRealSpace.cpp
    src/ConvertToDetectorFaceMD.cpp
    src/ConvertToDiffractionMDWorkspace.cpp
    src/ConvertToDiffractionMDWorkspace2.cpp
    src/ConvertToDiffractionMDWorkspace3.cpp
    src/ConvertToMD.cpp
    src/ConvertToMDMinMaxGlobal.cpp
    src/ConvertToMDMinMaxLocal.cpp
    src/ConvertToMDParent.cpp
Whitfield, Ross's avatar
Whitfield, Ross committed
35
    src/ConvertHFIRSCDtoMDE.cpp
36
37
38
39
40
41
42
43
44
45
46
47
    src/CreateMD.cpp
    src/CreateMDHistoWorkspace.cpp
    src/CreateMDWorkspace.cpp
    src/CutMD.cpp
    src/DisplayNormalizationSetter.cpp
    src/DivideMD.cpp
    src/EqualToMD.cpp
    src/EvaluateMDFunction.cpp
    src/ExponentialMD.cpp
    src/FakeMDEventData.cpp
    src/FindPeaksMD.cpp
    src/FitMD.cpp
48
    src/FlippingRatioCorrectionMD.cpp
49
50
51
52
53
54
55
    src/GetSpiceDataRawCountsFromMD.cpp
    src/GreaterThanMD.cpp
    src/IDynamicRebinning.cpp
    src/ImportMDEventWorkspace.cpp
    src/ImportMDHistoWorkspace.cpp
    src/ImportMDHistoWorkspaceBase.cpp
    src/Integrate3DEvents.cpp
56
    src/IntegrateQLabEvents.cpp
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    src/IntegrateEllipsoids.cpp
    src/IntegrateEllipsoidsTwoStep.cpp
    src/IntegrateFlux.cpp
    src/IntegrateMDHistoWorkspace.cpp
    src/IntegratePeaksCWSD.cpp
    src/IntegratePeaksMD.cpp
    src/IntegratePeaksMD2.cpp
    src/IntegratePeaksMDHKL.cpp
    src/InvalidParameter.cpp
    src/InvalidParameterParser.cpp
    src/LessThanMD.cpp
    src/LoadDNSSCD.cpp
    src/LoadMD.cpp
    src/LoadSQW.cpp
    src/LoadSQW2.cpp
    src/LogarithmMD.cpp
    src/MDEventWSWrapper.cpp
    src/MDNorm.cpp
    src/MDNormDirectSC.cpp
    src/MDNormSCD.cpp
    src/MDTransfAxisNames.cpp
    src/MDTransfFactory.cpp
    src/MDTransfModQ.cpp
    src/MDTransfNoQ.cpp
    src/MDTransfQ3D.cpp
    src/MDWSDescription.cpp
    src/MDWSTransform.cpp
    src/MaskMD.cpp
    src/MergeMD.cpp
    src/MergeMDFiles.cpp
    src/MinusMD.cpp
    src/MultiplyMD.cpp
    src/NotMD.cpp
    src/OrMD.cpp
    src/PlusMD.cpp
92
    src/PolarizationAngleCorrectionMD.cpp
93
94
95
96
97
98
99
100
101
    src/PowerMD.cpp
    src/PreprocessDetectorsToMD.cpp
    src/QueryMDWorkspace.cpp
    src/RecalculateTrajectoriesExtents.cpp
    src/ReplicateMD.cpp
    src/SaveIsawQvector.cpp
    src/SaveMD.cpp
    src/SaveMD2.cpp
    src/SaveZODS.cpp
102
    src/DgsScatteredTransmissionCorrectionMD.cpp
103
104
105
106
107
108
109
110
111
112
113
114
115
    src/SetMDFrame.cpp
    src/SetMDUsingMask.cpp
    src/SliceMD.cpp
    src/SlicingAlgorithm.cpp
    src/SmoothMD.cpp
    src/ThresholdMD.cpp
    src/TransformMD.cpp
    src/TransposeMD.cpp
    src/UnaryOperationMD.cpp
    src/UnitsConversionHelper.cpp
    src/UserFunctionMD.cpp
    src/WeightedMeanMD.cpp
    src/XorMD.cpp)
116

117
# set ( SRC_UNITY_IGNORE_FILES src/IDynamicRebinning.cpp )
118

119
120
121
122
set(
  INC_FILES
  inc/MantidMDAlgorithms/AccumulateMD.h
  inc/MantidMDAlgorithms/AndMD.h
123
  inc/MantidMDAlgorithms/ApplyDetailedBalanceMD.h
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
  inc/MantidMDAlgorithms/BaseConvertToDiffractionMDWorkspace.h
  inc/MantidMDAlgorithms/BinMD.h
  inc/MantidMDAlgorithms/BinaryOperationMD.h
  inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h
  inc/MantidMDAlgorithms/CalculateCoverageDGS.h
  inc/MantidMDAlgorithms/CentroidPeaksMD.h
  inc/MantidMDAlgorithms/CentroidPeaksMD2.h
  inc/MantidMDAlgorithms/ChangeQConvention.h
  inc/MantidMDAlgorithms/CloneMDWorkspace.h
  inc/MantidMDAlgorithms/CompactMD.h
  inc/MantidMDAlgorithms/CompareMDWorkspaces.h
  inc/MantidMDAlgorithms/ConvToMDBase.h
  inc/MantidMDAlgorithms/ConvToMDEventsWSIndexing.h
  inc/MantidMDAlgorithms/ConvertCWPDMDToSpectra.h
  inc/MantidMDAlgorithms/ConvertCWSDExpToMomentum.h
  inc/MantidMDAlgorithms/ConvertCWSDMDtoHKL.h
  inc/MantidMDAlgorithms/ConvertMDHistoToMatrixWorkspace.h
  inc/MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h
  inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h
  inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h
  inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h
  inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace3.h
  inc/MantidMDAlgorithms/ConvertToMD.h
  inc/MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h
  inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h
  inc/MantidMDAlgorithms/ConvertToMDParent.h
Whitfield, Ross's avatar
Whitfield, Ross committed
150
  inc/MantidMDAlgorithms/ConvertHFIRSCDtoMDE.h
151
152
153
154
155
156
157
158
159
160
161
162
163
  inc/MantidMDAlgorithms/CreateMD.h
  inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h
  inc/MantidMDAlgorithms/CreateMDWorkspace.h
  inc/MantidMDAlgorithms/CutMD.h
  inc/MantidMDAlgorithms/DisplayNormalizationSetter.h
  inc/MantidMDAlgorithms/DivideMD.h
  inc/MantidMDAlgorithms/DllConfig.h
  inc/MantidMDAlgorithms/EqualToMD.h
  inc/MantidMDAlgorithms/EvaluateMDFunction.h
  inc/MantidMDAlgorithms/ExponentialMD.h
  inc/MantidMDAlgorithms/FakeMDEventData.h
  inc/MantidMDAlgorithms/FindPeaksMD.h
  inc/MantidMDAlgorithms/FitMD.h
164
  inc/MantidMDAlgorithms/FlippingRatioCorrectionMD.h
165
166
167
168
169
170
171
172
  inc/MantidMDAlgorithms/GSLFunctions.h
  inc/MantidMDAlgorithms/GetSpiceDataRawCountsFromMD.h
  inc/MantidMDAlgorithms/GreaterThanMD.h
  inc/MantidMDAlgorithms/IDynamicRebinning.h
  inc/MantidMDAlgorithms/ImportMDEventWorkspace.h
  inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h
  inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h
  inc/MantidMDAlgorithms/Integrate3DEvents.h
173
  inc/MantidMDAlgorithms/IntegrateQLabEvents.h
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
  inc/MantidMDAlgorithms/IntegrateEllipsoids.h
  inc/MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h
  inc/MantidMDAlgorithms/IntegrateFlux.h
  inc/MantidMDAlgorithms/IntegrateMDHistoWorkspace.h
  inc/MantidMDAlgorithms/IntegratePeaksCWSD.h
  inc/MantidMDAlgorithms/IntegratePeaksMD.h
  inc/MantidMDAlgorithms/IntegratePeaksMD2.h
  inc/MantidMDAlgorithms/IntegratePeaksMDHKL.h
  inc/MantidMDAlgorithms/InvalidParameter.h
  inc/MantidMDAlgorithms/InvalidParameterParser.h
  inc/MantidMDAlgorithms/LessThanMD.h
  inc/MantidMDAlgorithms/LoadDNSSCD.h
  inc/MantidMDAlgorithms/LoadMD.h
  inc/MantidMDAlgorithms/LoadSQW.h
  inc/MantidMDAlgorithms/LoadSQW2.h
  inc/MantidMDAlgorithms/LogarithmMD.h
190
  inc/MantidMDAlgorithms/MDBoxMaskFunction.h
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  inc/MantidMDAlgorithms/MDEventTreeBuilder.h
  inc/MantidMDAlgorithms/MDEventWSWrapper.h
  inc/MantidMDAlgorithms/MDNorm.h
  inc/MantidMDAlgorithms/MDNormDirectSC.h
  inc/MantidMDAlgorithms/MDNormSCD.h
  inc/MantidMDAlgorithms/MDTransfAxisNames.h
  inc/MantidMDAlgorithms/MDTransfFactory.h
  inc/MantidMDAlgorithms/MDTransfInterface.h
  inc/MantidMDAlgorithms/MDTransfModQ.h
  inc/MantidMDAlgorithms/MDTransfNoQ.h
  inc/MantidMDAlgorithms/MDTransfQ3D.h
  inc/MantidMDAlgorithms/MDWSDescription.h
  inc/MantidMDAlgorithms/MDWSTransform.h
  inc/MantidMDAlgorithms/MaskMD.h
  inc/MantidMDAlgorithms/MergeMD.h
  inc/MantidMDAlgorithms/MergeMDFiles.h
  inc/MantidMDAlgorithms/MinusMD.h
  inc/MantidMDAlgorithms/MultiplyMD.h
  inc/MantidMDAlgorithms/NotMD.h
  inc/MantidMDAlgorithms/OrMD.h
  inc/MantidMDAlgorithms/PlusMD.h
212
  inc/MantidMDAlgorithms/PolarizationAngleCorrectionMD.h
213
214
215
216
217
218
219
220
221
  inc/MantidMDAlgorithms/PowerMD.h
  inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h
  inc/MantidMDAlgorithms/QueryMDWorkspace.h
  inc/MantidMDAlgorithms/RecalculateTrajectoriesExtents.h
  inc/MantidMDAlgorithms/ReplicateMD.h
  inc/MantidMDAlgorithms/SaveIsawQvector.h
  inc/MantidMDAlgorithms/SaveMD.h
  inc/MantidMDAlgorithms/SaveMD2.h
  inc/MantidMDAlgorithms/SaveZODS.h
222
  inc/MantidMDAlgorithms/DgsScatteredTransmissionCorrectionMD.h
223
224
225
226
227
228
229
230
231
232
233
234
235
236
  inc/MantidMDAlgorithms/SetMDFrame.h
  inc/MantidMDAlgorithms/SetMDUsingMask.h
  inc/MantidMDAlgorithms/SliceMD.h
  inc/MantidMDAlgorithms/SlicingAlgorithm.h
  inc/MantidMDAlgorithms/SmoothMD.h
  inc/MantidMDAlgorithms/ThresholdMD.h
  inc/MantidMDAlgorithms/TransformMD.h
  inc/MantidMDAlgorithms/TransposeMD.h
  inc/MantidMDAlgorithms/UnaryOperationMD.h
  inc/MantidMDAlgorithms/UnitsConversionHelper.h
  inc/MantidMDAlgorithms/Vector3DParameter.h
  inc/MantidMDAlgorithms/Vector3DParameterParser.h
  inc/MantidMDAlgorithms/WeightedMeanMD.h
  inc/MantidMDAlgorithms/XorMD.h)
237

238
# Test files. Other source files required.
239
240
241
242
set(TEST_FILES
    # these tests are as they test verify different parts of the CPR algorithms
    AccumulateMDTest.h
    AndMDTest.h
243
    ApplyDetailedBalanceMDTest.h
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
    BooleanBinaryOperationMDTest.h
    CalculateCoverageDGSTest.h
    CentroidPeaksMD2Test.h
    CentroidPeaksMDTest.h
    ChangeQConventionTest.h
    CloneMDWorkspaceTest.h
    CompactMDTest.h
    CompareMDWorkspacesTest.h
    ConvToMDEventsWSIndexingTest.h
    ConvertCWPDMDToSpectraTest.h
    ConvertCWSDExpToMomentumTest.h
    ConvertCWSDMDtoHKLTest.h
    ConvertEventsToMDTest.h
    ConvertMDHistoToMatrixWorkspaceTest.h
    ConvertSpiceDataToRealSpaceTest.h
    ConvertToDetectorFaceMDTest.h
    ConvertToDiffractionMDWorkspace2Test.h
    ConvertToDiffractionMDWorkspace3Test.h
    ConvertToDiffractionMDWorkspaceTest.h
    ConvertToMDComponentsTest.h
    ConvertToMDMinMaxGlobalTest.h
    ConvertToMDMinMaxLocalTest.h
    ConvertToMDTest.h
    ConvertToQ3DdETest.h
Whitfield, Ross's avatar
Whitfield, Ross committed
268
    ConvertHFIRSCDtoMDETest.h
269
270
271
272
273
274
275
276
277
278
279
280
    CreateMDHistoWorkspaceTest.h
    CreateMDTest.h
    CreateMDWorkspaceTest.h
    CutMDTest.h
    DisplayNormalizationSetterTest.h
    DivideMDTest.h
    EqualToMDTest.h
    EvaluateMDFunctionTest.h
    ExponentialMDTest.h
    FakeMDEventDataTest.h
    FindPeaksMDTest.h
    FitMDTest.h
281
    FlippingRatioCorrectionMDTest.h
282
283
284
285
286
    GetSpiceDataRawCountsFromMDTest.h
    GreaterThanMDTest.h
    ImportMDEventWorkspaceTest.h
    ImportMDHistoWorkspaceTest.h
    Integrate3DEventsTest.h
287
    IntegrateQLabEventsTest.h
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
    IntegrateEllipsoidsTest.h
    IntegrateEllipsoidsTwoStepTest.h
    IntegrateEllipsoidsWithSatellitesTest.h
    IntegrateFluxTest.h
    IntegrateMDHistoWorkspaceTest.h
    IntegratePeaksCWSDTest.h
    IntegratePeaksMD2Test.h
    IntegratePeaksMDHKLTest.h
    IntegratePeaksMDTest.h
    InvalidParameterParserTest.h
    InvalidParameterTest.h
    LessThanMDTest.h
    LoadDNSSCDTest.h
    LoadMDTest.h
    LoadSQW2Test.h
    LoadSQWTest.h
    LogarithmMDTest.h
305
    MDBoxMaskFunctionTest.h
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
    MDEventWSWrapperTest.h
    MDNormDirectSCTest.h
    MDNormSCDTest.h
    MDTransfAxisNamesTest.h
    MDTransfFactoryTest.h
    MDTransfModQTest.h
    MDTransfQ3DTest.h
    MDWSDescriptionTest.h
    MDWSTransfTest.h
    MaskMDTest.h
    MergeMDFilesTest.h
    MergeMDTest.h
    MinusMDTest.h
    MultiplyMDTest.h
    NotMDTest.h
    OrMDTest.h
    PlusMDTest.h
323
    PolarizationAngleCorrectionMDTest.h
324
325
326
327
328
329
330
331
332
    PowerMDTest.h
    PreprocessDetectorsToMDTest.h
    QueryMDWorkspaceTest.h
    RecalculateTrajectoriesExtentsTest.h
    ReplicateMDTest.h
    SaveIsawQvectorTest.h
    SaveMD2Test.h
    SaveMDTest.h
    SaveZODSTest.h
333
    DgsScatteredTransmissionCorrectionMDTest.h
334
335
336
337
338
339
340
341
342
343
344
345
    SetMDFrameTest.h
    SetMDUsingMaskTest.h
    SliceMDTest.h
    SlicingAlgorithmTest.h
    SmoothMDTest.h
    ThresholdMDTest.h
    TransformMDTest.h
    TransposeMDTest.h
    UnaryOperationMDTest.h
    UnitsConversionHelperTest.h
    WeightedMeanMDTest.h
    XorMDTest.h)
346

347
set(GMOCK_TEST_FILES BinaryOperationMDTest.h BinMDTest.h)
348

349
if(COVERAGE)
350
351
352
353
354
  foreach(loop_var ${SRC_FILES} ${INC_FILES})
    set_property(GLOBAL APPEND
                 PROPERTY COVERAGE_SRCS
                          "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
  endforeach(loop_var)
355
356
endif()

357
if(UNITY_BUILD)
358
359
  include(UnityBuild)
  enable_unity_build(MDAlgorithms SRC_FILES SRC_UNITY_IGNORE_FILES 10)
360
361
endif(UNITY_BUILD)

362
# Use a precompiled header where they are supported
363
enable_precompiled_headers(inc/MantidMDAlgorithms/PrecompiledHeader.h SRC_FILES)
364
# Add the target for this directory
365
add_library(MDAlgorithms ${SRC_FILES} ${INC_FILES})
Stephen's avatar
Stephen committed
366
367
368
369
370
371
372
add_library(Mantid::MDAlgorithms ALIAS MDAlgorithms)

target_include_directories(MDAlgorithms PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
		$<INSTALL_INTERFACE:include/Mantid>
)

373
# Set the name of the generated library
374
375
376
377
378
379
380
381
382
set_target_properties(MDAlgorithms
                      PROPERTIES OUTPUT_NAME
                                 MantidMDAlgorithms
                                 COMPILE_DEFINITIONS
                                 IN_MANTID_MDALGORITHMS)
# set /bigobj for vc due to intensive templating
if(MSVC)
  set_target_properties(MDAlgorithms PROPERTIES COMPILE_FLAGS "/bigobj")
endif()
383

384
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
385
386
387
388
389
390
391
  set_target_properties(MDAlgorithms
                        PROPERTIES INSTALL_RPATH
                                   "@loader_path/../Contents/MacOS")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  set_target_properties(MDAlgorithms
                        PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}")
endif()
392

393
# Add to the 'Framework' group in VS
394
set_property(TARGET MDAlgorithms PROPERTY FOLDER "MantidFramework")
395

Stephen's avatar
Stephen committed
396
target_link_libraries(MDAlgorithms PUBLIC Mantid::API Mantid::DataObjects Mantid::Kernel Mantid::Geometry)
397

398
# Add the unit tests directory
399
add_subdirectory(test)
400
401

# Installation settings
402
403
404
405
406
407
408
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidMDAlgorithmsTargets")
mtd_install_framework_lib(TARGETS
                  MDAlgorithms
                  EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
409
410
411
412
                    MDAlgorithms
                    INSTALL_DIRS
                    ${PLUGINS_DIR}
                    ${WORKBENCH_PLUGINS_DIR})
413
414
endif()