forked from apache/tsfile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
266 lines (264 loc) · 12.2 KB
/
pom.xml
File metadata and controls
266 lines (264 loc) · 12.2 KB
1
2
3
4
5
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
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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile-parent</artifactId>
<version>2.2.1-SNAPSHOT</version>
</parent>
<artifactId>tsfile-cpp</artifactId>
<packaging>pom</packaging>
<name>TsFile: C++</name>
<properties>
<!-- Tell Sonar where to find the sources -->
<sonar.sources>common,examples,tsfile</sonar.sources>
<sonar.cfamily.build-wrapper-output>${project.build.directory}/build-wrapper-output</sonar.cfamily.build-wrapper-output>
<coverage.enabled>OFF</coverage.enabled>
<build.type>Release</build.type>
<enable.asan>OFF</enable.asan>
<build.test>ON</build.test>
<enable.snappy>ON</enable.snappy>
<enable.lz4>ON</enable.lz4>
<enable.lzokay>ON</enable.lzokay>
<enable.zlib>ON</enable.zlib>
<enable.antlr4>ON</enable.antlr4>
</properties>
<build>
<sourceDirectory>${project.basedir}</sourceDirectory>
<plugins>
<!--
Do the actual build.
-->
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
<executions>
<!-- Generate the configuration for the main compilation -->
<!--execution>
<id>cmake-generate-compile</id>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
<!- Compile the main code ->
<execution>
<id>cmake-execute-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution-->
<!-- Generate the configuration for the test compilation -->
<execution>
<id>cmake-generate-test-compile</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<options>
<option>-DBUILD_PHASE=test-compile</option>
<option>-DCOV_ENABLED=${coverage.enabled}</option>
<option>-DCMAKE_BUILD_TYPE=${build.type}</option>
<option>-DENABLE_ASAN=${enable.asan}</option>
<option>-DBUILD_TEST=${build.test}</option>
<option>-DENABLE_ANTLR4=${enable.antlr4}</option>
<option>-DENABLE_SNAPPY=${enable.snappy}</option>
<option>-DENABLE_LZ4=${enable.lz4}</option>
<option>-DENABLE_LZOKAY=${enable.lzokay}</option>
<option>-DENABLE_ZLIB=${enable.zlib}</option>
</options>
<sourcePath/>
<targetPath/>
</configuration>
</execution>
<!-- Compile the test code -->
<execution>
<id>cmake-execute-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<!-- Execute the tests -->
<execution>
<id>cmake-run-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<buildDirectory>${project.build.directory}/build/test</buildDirectory>
</configuration>
</execution>
</executions>
<configuration>
<!--
Actually the path to the CMakeList.txt file which then again
tells to tool where to find the sources.
-->
<sourcePath>${project.basedir}</sourcePath>
<!--
Path to where the build configuration is generated
(This directory is then used in the compile step to actually perform the build)
-->
<targetPath>${project.build.directory}/build</targetPath>
<!--
Name of the generator the compile step will be executing.
-->
<generator>${cmake.generator}</generator>
<!-- The directory where the "generate" step generated the build configuration -->
<projectDirectory>${project.build.directory}/build</projectDirectory>
</configuration>
</plugin>
<!-- Overwrite test config-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<executions>
<!-- rename the cmake binary and generate a script that adds the sonar build-wrapper -->
<execution>
<id>sync-project-version</id>
<phase>process-sources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>${project.basedir}/VersionUpdater.groovy</source>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>linux-install-uuid-dev</id>
<activation>
<os>
<family>unix</family>
<name>Linux</name>
</os>
</activation>
</profile>
<!-- When running on jenkins, download the sonar build-wrapper, so we can do a code analysis -->
<profile>
<id>jenkins-build</id>
<!-- This is needed by the groovy hack script -->
<properties>
<cmake.root>${project.build.directory}/dependency/cmake/bin</cmake.root>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<!-- Get the build-wrapper from our sonarcloud server -->
<execution>
<id>get-build-wrapper</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<skipCache>true</skipCache>
<url>https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
<skipCache>true</skipCache>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>with-code-coverage</id>
<properties>
<coverage.enabled>ON</coverage.enabled>
</properties>
</profile>
<profile>
<id>.java-9-and-above</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.44.3</version>
<configuration>
<cpp>
<includes>
<!-- You have to set the target manually -->
<include>bench_mark/**/*.h</include>
<include>bench_mark/**/*.cc</include>
<include>examples/**/*.h</include>
<include>examples/**/*.c</include>
<include>examples/**/*.cc</include>
<include>src/**/*.h</include>
<include>src/**/*.c</include>
<include>src/**/*.cc</include>
<include>test/**/*.h</include>
<include>test/**/*.c</include>
<include>test/**/*.cc</include>
</includes>
<clangFormat>
<!--pathToExe>/path/to/buf</pathToExe-->
<!-- optional: if clang-format isn't in your path -->
<version>${clang.format.version}</version>
<style>file</style>
<!-- optional: can be LLVM, Google, Chromium, Mozilla, WebKit -->
</clangFormat>
</cpp>
<lineEndings>UNIX</lineEndings>
<skip>${spotless.skip}</skip>
</configuration>
<executions>
<execution>
<id>spotless-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>