CMakeLists.txt 3.65 KB
Newer Older
1
# Source files
2
set ( SRC_FILES
3
	src/BinToMDHistoWorkspace.cpp
4
	src/CoordTransform.cpp
5
	src/CoordTransformDistance.cpp
6
	src/CreateMDEventWorkspace.cpp
7
	src/FakeMDEventData.cpp
8
	src/IMDBox.cpp
9
10
	src/MDBin.cpp
	src/MDBox.cpp
11
	src/MDCentroidPeaks.cpp
12
	src/MDEWFindPeaks.cpp
13
14
15
16
17
	src/MDEWPeakIntegration.cpp
	src/MDEventFactory.cpp
	src/MDEventWorkspace.cpp
	src/MDGridBox.cpp
	src/MDHistoWorkspace.cpp
18
	src/MDSplitBox.cpp
19
20
	src/MakeDiffractionMDEventWorkspace.cpp
	src/OneStepMDEW.cpp
21
22
)

23
set ( SRC_UNITY_IGNORE_FILES 
24
    src/IMDBox.cpp
25
	src/MDBin.cpp
26
27
28
    src/MDBox.cpp
    src/MDEventWorkspace.cpp
    src/MDGridBox.cpp
29
    src/MDSplitBox.cpp
30
31
)

32
# Header files
33
34
set ( INC_FILES
	inc/MantidMDEvents/BinToMDHistoWorkspace.h
35
	inc/MantidMDEvents/BoxController.h
36
	inc/MantidMDEvents/CoordTransform.h
37
	inc/MantidMDEvents/CoordTransformDistance.h
38
	inc/MantidMDEvents/CreateMDEventWorkspace.h
39
40
	inc/MantidMDEvents/FakeMDEventData.h
	inc/MantidMDEvents/IMDBox.h
41
	inc/MantidMDEvents/MDBin.h
42
	inc/MantidMDEvents/MDBox.h
43
	inc/MantidMDEvents/MDCentroidPeaks.h
44
	inc/MantidMDEvents/MDDimensionExtents.h
45
	inc/MantidMDEvents/MDDimensionStats.h
46
	inc/MantidMDEvents/MDEWFindPeaks.h
47
48
49
50
51
	inc/MantidMDEvents/MDEWPeakIntegration.h
	inc/MantidMDEvents/MDEvent.h
	inc/MantidMDEvents/MDEventFactory.h
	inc/MantidMDEvents/MDEventWorkspace.h
	inc/MantidMDEvents/MDGridBox.h
52
	inc/MantidMDEvents/MDHistoWorkspace.h
53
	inc/MantidMDEvents/MDSplitBox.h
54
	inc/MantidMDEvents/MakeDiffractionMDEventWorkspace.h
55
	inc/MantidMDEvents/OneStepMDEW.h
56
57
58
)

# Test files. Other source files required.
59
set ( TEST_FILES
60
	test/BoxControllerTest.h
61
	test/CoordTransformDistanceTest.h
62
	test/CoordTransformTest.h
63
	test/CreateMDEventWorkspaceTest.h
64
	test/FakeMDEventDataTest.h
65
	test/IMDBoxTest.h
66
	test/MDBinTest.h
67
	test/MDBoxTest.h
68
	test/MDCentroidPeaksTest.h
69
	test/MDDimensionStatsTest.h
70
	test/MDEWFindPeaksTest.h
71
72
73
74
75
	test/MDEWPeakIntegrationTest.h
	test/MDEventFactoryTest.h
	test/MDEventTest.h
	test/MDEventWorkspaceTest.h
	test/MDGridBoxTest.h
76
	test/MDHistoWorkspaceTest.h
77
	test/MDSplitBoxTest.h
78
	test/MakeDiffractionMDEventWorkspaceTest.h
79
	test/OneStepMDEWTest.h
80
81
82
)

set ( GMOCK_TEST_FILES
83
	test/BinToMDHistoWorkspaceTest.h
84
85
)

86
87
if(UNITY_BUILD)
  include(UnityBuild)
88
  enable_unity_build(MDEvents SRC_FILES SRC_UNITY_IGNORE_FILES 10)
89
90
endif(UNITY_BUILD)

91
92
93
# Add the target for this directory
add_library ( MDEvents ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
94
set_target_properties ( MDEvents PROPERTIES OUTPUT_NAME MantidMDEvents 
95
96
97
                                                 COMPILE_DEFINITIONS IN_MANTID_MDEVENT )
                                                 
# Add to the 'Framework' group in VS
98
set_property ( TARGET MDEvents PROPERTY FOLDER "MantidFramework" )
99

100
include_directories(${HDF5_INCLUDE_DIRS} inc ../Algorithms/inc)
101
target_link_libraries ( MDEvents ${MANTIDLIBS} ${HDF5_LIBRARIES} )
102
103
104

# Create test file projects
if ( CXXTEST_FOUND )
105
106
  include_directories(${HDF5_INCLUDE_DIRS} inc ../TestHelpers/inc 
      ../CurveFitting/inc ../DataHandling/inc ../Nexus/inc ../DataObjects/inc  )
107
  
108
109
  if ( GMOCK_FOUND AND GTEST_FOUND )
    cxxtest_add_test ( MDEventsTest ${TEST_FILES} ${GMOCK_TEST_FILES} )
110
111
112
    target_link_libraries( MDEventsTest MDEvents ${MANTIDLIBS} ${HDF5_LIBRARIES}
         ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES} DataHandling Nexus 
         TestHelpers DataObjects )
113
114
  else ()
    cxxtest_add_test ( MDEventsTest ${TEST_FILES} )
115
116
    target_link_libraries( MDEventsTest MDEvents ${MANTIDLIBS} ${HDF5_LIBRARIES}
         DataHandling Nexus TestHelpers DataObjects )
117
118
119
120
121
  endif ()
  
  add_dependencies ( FrameworkTests MDEventsTest )
  
  # Add to the 'FrameworkTests' group in VS
122
  set_property ( TARGET MDEventsTest PROPERTY FOLDER "UnitTests" )
123
124
125
  
endif ()