This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new e0f24a68ac0 doc(cpp-client): update build scripts
e0f24a68ac0 is described below
commit e0f24a68ac07b506d3b75a02779da48a0c3987c6
Author: CritasWang <[email protected]>
AuthorDate: Fri Jan 12 15:00:22 2024 +0800
doc(cpp-client): update build scripts
---
example/client-cpp-example/README.md | 2 +-
iotdb-client/client-cpp/README.md | 20 ++++++++++++++++----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/example/client-cpp-example/README.md
b/example/client-cpp-example/README.md
index 976306fc376..f36a084f888 100644
--- a/example/client-cpp-example/README.md
+++ b/example/client-cpp-example/README.md
@@ -26,7 +26,7 @@
Using maven to build this example project:
* cd the root path of the whole project
-* run `mvn package -DskipTests -P compile-cpp -pl example/client-cpp-example
-am`
+* run `mvn clean package -DskipTests -P with-cpp -pl
example/client-cpp-example -am`
* cd example/client-cpp-example/target
You can find some files to form a complete project:
diff --git a/iotdb-client/client-cpp/README.md
b/iotdb-client/client-cpp/README.md
index 756110f4d40..deb6ea4e428 100644
--- a/iotdb-client/client-cpp/README.md
+++ b/iotdb-client/client-cpp/README.md
@@ -20,15 +20,28 @@
-->
# Building C++ Client
-To compile cpp client, add "-P compile-cpp" option to maven build command.
+To compile cpp client, add "-P with-cpp" option to maven build command.
The compiling requires the module "compile-tools" to be built first.
For more information, please refer to "compile-tools/README.md".
+Explicitly using mvnw here as the build requires maven 3.9 and the default
installation is older
## Compile and Test:
-`mvn integration-test -P compile-cpp -pl client-cpp,server -am
-Diotdb.test.skip=true -Dtsfile.test.skip=true -Djdbc.test.skip=true`
+### Compile
+`mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests`
+
+### Test
+First build IoTDB server
+
+Explicitly using "install" instead of package in order to be sure we're using
libs built on this machine
+
+`mvn clean install -P with-cpp -pl distribution,iotdb-client/client-cpp -am
-DskipTests`
+
+After run verify
+
+`mvn clean verify -P with-cpp -pl iotdb-client/client-cpp -am`
To compile on Windows, please install Boost first and add following Maven
settings:
```
@@ -37,8 +50,7 @@ To compile on Windows, please install Boost first and add
following Maven settin
e.g.,
```
-mvn integration-test -P compile-cpp -pl
client-cpp,server,example/client-cpp-example -am
--D"iotdb.test.skip"=true -D"tsfile.test.skip"=true -D"jdbc.test.skip"=true
+mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTest
-D"boost.include.dir"="D:\boost_1_75_0"
-D"boost.library.dir"="D:\boost_1_75_0\stage\lib"
```