CMakeLists.txt 5.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
set(SRC_FILES
    src/BinEdges.cpp
    src/CountStandardDeviations.cpp
    src/CountVariances.cpp
    src/Counts.cpp
    src/EstimatePolynomial.cpp
    src/Exception.cpp
    src/Frequencies.cpp
    src/FrequencyStandardDeviations.cpp
    src/FrequencyVariances.cpp
    src/Histogram.cpp
    src/HistogramBuilder.cpp
    src/HistogramMath.cpp
    src/Interpolate.cpp
    src/Points.cpp
    src/Rebin.cpp
    src/Slice.cpp)
18

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
set(INC_FILES
    inc/MantidHistogramData/Addable.h
    inc/MantidHistogramData/BinEdges.h
    inc/MantidHistogramData/CountStandardDeviations.h
    inc/MantidHistogramData/CountVariances.h
    inc/MantidHistogramData/Counts.h
    inc/MantidHistogramData/EValidation.h
    inc/MantidHistogramData/EstimatePolynomial.h
    inc/MantidHistogramData/Exception.h
    inc/MantidHistogramData/FixedLengthVector.h
    inc/MantidHistogramData/Frequencies.h
    inc/MantidHistogramData/FrequencyStandardDeviations.h
    inc/MantidHistogramData/FrequencyVariances.h
    inc/MantidHistogramData/Histogram.h
    inc/MantidHistogramData/HistogramBuilder.h
    inc/MantidHistogramData/HistogramDx.h
    inc/MantidHistogramData/HistogramE.h
    inc/MantidHistogramData/HistogramItem.h
    inc/MantidHistogramData/HistogramIterator.h
    inc/MantidHistogramData/HistogramMath.h
    inc/MantidHistogramData/HistogramX.h
    inc/MantidHistogramData/HistogramY.h
    inc/MantidHistogramData/Interpolate.h
    inc/MantidHistogramData/Iterable.h
    inc/MantidHistogramData/LinearGenerator.h
    inc/MantidHistogramData/LogarithmicGenerator.h
    inc/MantidHistogramData/Multipliable.h
    inc/MantidHistogramData/Offsetable.h
    inc/MantidHistogramData/PointStandardDeviations.h
    inc/MantidHistogramData/PointVariances.h
    inc/MantidHistogramData/Points.h
    inc/MantidHistogramData/QuadraticGenerator.h
    inc/MantidHistogramData/Rebin.h
    inc/MantidHistogramData/Scalable.h
    inc/MantidHistogramData/Slice.h
    inc/MantidHistogramData/StandardDeviationVectorOf.h
    inc/MantidHistogramData/Validation.h
    inc/MantidHistogramData/VarianceVectorOf.h
    inc/MantidHistogramData/VectorOf.h
    inc/MantidHistogramData/XValidation.h
    inc/MantidHistogramData/YValidation.h)
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
92
93
94
95
96
97
98
set(TEST_FILES
    AddableTest.h
    BinEdgesTest.h
    CountStandardDeviationsTest.h
    CountVariancesTest.h
    CountsTest.h
    EValidationTest.h
    EstimatePolynomialTest.h
    FixedLengthVectorTest.h
    FrequenciesTest.h
    FrequencyStandardDeviationsTest.h
    FrequencyVariancesTest.h
    HistogramBuilderTest.h
    HistogramDxTest.h
    HistogramETest.h
    HistogramIteratorTest.h
    HistogramMathTest.h
    HistogramTest.h
    HistogramXTest.h
    HistogramYTest.h
    InterpolateTest.h
    IterableTest.h
    LinearGeneratorTest.h
    LogarithmicGeneratorTest.h
    MultipliableTest.h
    OffsetableTest.h
    PointStandardDeviationsTest.h
    PointVariancesTest.h
    PointsTest.h
    QuadraticGeneratorTest.h
    RebinTest.h
    ScalableTest.h
    SliceTest.h
    StandardDeviationVectorOfTest.h
    VarianceVectorOfTest.h
    VectorOfTest.h
    XValidationTest.h
    YValidationTest.h)
99

100
if(COVERAGE)
101
102
103
104
  foreach(loop_var ${SRC_FILES} ${INC_FILES})
    set_property(GLOBAL APPEND
                 PROPERTY COVERAGE_SRCS
                          "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
105
106
107
108
109
  endforeach(loop_var)
endif()

if(UNITY_BUILD)
  include(UnityBuild)
110
  enable_unity_build(HistogramData SRC_FILES SRC_UNITY_IGNORE_FILES 10)
111
112
113
endif(UNITY_BUILD)

# Add the target for this directory
114
add_library(HistogramData ${SRC_FILES} ${INC_FILES})
115
116
add_library(Mantid::HistogramData ALIAS HistogramData)

117
# Set the name of the generated library
118
119
120
121
122
set_target_properties(HistogramData
                      PROPERTIES OUTPUT_NAME
                                 MantidHistogramData
                                 COMPILE_DEFINITIONS
                                 IN_MANTID_HISTOGRAMDATA)
123

124
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
125
  set_target_properties(HistogramData
126
                        PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Frameworks")
127
128
129
130
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  set_target_properties(HistogramData
                        PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}")
endif()
131
132

# Add to the 'Framework' group in VS
133
set_property(TARGET HistogramData PROPERTY FOLDER "MantidFramework")
134

135
136
137
138
139
140
target_include_directories(HistogramData PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
		$<INSTALL_INTERFACE:include/Mantid>
)

target_link_libraries(HistogramData PUBLIC Kernel)
141
142

# Add the unit tests directory
143
add_subdirectory(test)
144

145
# Auto-generate exports header
Stephen's avatar
Stephen committed
146
147
148
149
target_include_directories(HistogramData PUBLIC
  $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/Framework/HistogramData>
  $<INSTALL_INTERFACE:include/Mantid>
)
150
generate_mantid_export_header(HistogramData FALSE)
151

152
# Installation settings
153
if (CONDA_BUILD)
Stephen's avatar
Stephen committed
154
set(TARGET_EXPORT_NAME "MantidHistogramDataTargets")
155
156
157
158
159
160
161
162
mtd_install_framework_lib(TARGETS HistogramData INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
                    HistogramData
                    INSTALL_DIRS
                    ${LIB_DIR}
                    ${WORKBENCH_LIB_DIR})
endif()
Stephen's avatar
Stephen committed
163