| <?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 |
| |
| http://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.iotdb</groupId> |
| <artifactId>iotdb-examples</artifactId> |
| <version>1.1.1-SNAPSHOT</version> |
| <relativePath>../pom.xml</relativePath> |
| </parent> |
| <artifactId>client-cpp-example</artifactId> |
| <name>IoTDB-Client CPP Examples</name> |
| <properties> |
| <cmake-version>3.17.3</cmake-version> |
| <cmake.build.type>Release</cmake.build.type> |
| </properties> |
| <profiles> |
| <profile> |
| <id>os-unix</id> |
| <activation> |
| <os> |
| <family>unix</family> |
| </os> |
| </activation> |
| <properties> |
| <cmake.generator>Unix Makefiles</cmake.generator> |
| <cmake.root.dir>${project.parent.basedir}/../compile-tools/thrift/target/cmake-${cmake-version}-Linux-x86_64/</cmake.root.dir> |
| </properties> |
| </profile> |
| <profile> |
| <id>os-unix-arm</id> |
| <activation> |
| <os> |
| <family>unix</family> |
| <arch>aarch64</arch> |
| </os> |
| </activation> |
| <properties> |
| <os.suffix>linux</os.suffix> |
| <os.classifier>linux-arm_32</os.classifier> |
| <cmake.generator>Unix Makefiles</cmake.generator> |
| <cmake.root.dir>${project.parent.basedir}/../compile-tools/thrift/target/cmake-3.21.2-linux-aarch64/</cmake.root.dir> |
| </properties> |
| </profile> |
| <profile> |
| <id>os-mac</id> |
| <activation> |
| <os> |
| <family>mac</family> |
| </os> |
| </activation> |
| <properties> |
| <cmake.generator>Unix Makefiles</cmake.generator> |
| <cmake.root.dir>${project.parent.basedir}/../compile-tools/thrift/target/cmake-${cmake-version}-Darwin-x86_64/CMake.app/Contents</cmake.root.dir> |
| <boost.include.dir>/usr/local/include</boost.include.dir> |
| </properties> |
| </profile> |
| <profile> |
| <id>os-windows</id> |
| <activation> |
| <os> |
| <family>windows</family> |
| </os> |
| </activation> |
| <properties> |
| <cmake.generator>Visual Studio 16 2019</cmake.generator> |
| <cmake.root.dir>${project.parent.basedir}/../compile-tools/thrift/target/cmake-${cmake-version}-win64-x64/</cmake.root.dir> |
| <boost.include.dir /> |
| </properties> |
| </profile> |
| <profile> |
| <id>compile-cpp</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>com.coderplus.maven.plugins</groupId> |
| <artifactId>copy-rename-maven-plugin</artifactId> |
| <version>1.0.1</version> |
| <executions> |
| <execution> |
| <id>copy-thrift-source</id> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <fileSets> |
| <fileSet> |
| <sourceFile>${project.basedir}/src/SessionExample.cpp</sourceFile> |
| <destinationFile>${project.build.directory}/SessionExample.cpp</destinationFile> |
| </fileSet> |
| <fileSet> |
| <sourceFile>${project.basedir}/src/AlignedTimeseriesSessionExample.cpp</sourceFile> |
| <destinationFile>${project.build.directory}/AlignedTimeseriesSessionExample.cpp</destinationFile> |
| </fileSet> |
| <fileSet> |
| <sourceFile>${project.basedir}/src/CMakeLists.txt</sourceFile> |
| <destinationFile>${project.build.directory}/CMakeLists.txt</destinationFile> |
| </fileSet> |
| </fileSets> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>unpack-client</id> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.iotdb</groupId> |
| <artifactId>client-cpp</artifactId> |
| <version>${project.version}</version> |
| <type>zip</type> |
| <classifier>cpp-${os.classifier}</classifier> |
| <overWrite>true</overWrite> |
| </artifactItem> |
| </artifactItems> |
| <outputDirectory>${project.build.directory}/client</outputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>com.googlecode.cmake-maven-project</groupId> |
| <artifactId>cmake-maven-plugin</artifactId> |
| <version>3.7.2-b1</version> |
| <executions> |
| <execution> |
| <id>cmake-generate</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <classifier>${os.classifier}</classifier> |
| <downloadBinaries>false</downloadBinaries> |
| <sourcePath>${project.build.directory}</sourcePath> |
| <targetPath>${project.build.directory}</targetPath> |
| <generator>${cmake.generator}</generator> |
| <options> |
| <option>-DBOOST_INCLUDEDIR=${boost.include.dir}</option> |
| </options> |
| </configuration> |
| </execution> |
| <execution> |
| <id>cmake-compile</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>compile</goal> |
| </goals> |
| <configuration> |
| <classifier>${os.classifier}</classifier> |
| <config>${cmake.build.type}</config> |
| <downloadBinaries>false</downloadBinaries> |
| <!-- The directory where the "generate" step generated the build configuration --> |
| <projectDirectory>${project.build.directory}</projectDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.iotdb</groupId> |
| <artifactId>client-cpp</artifactId> |
| <version>${project.version}</version> |
| <type>pom</type> |
| </dependency> |
| </dependencies> |
| </project> |