[Tarantool-patches] [RFC PATCH 01/13] build: add Christian Hansen c-dt to the build
Timur Safin
tsafin at tarantool.org
Thu Jul 15 11:18:07 MSK 2021
* Integrated chansen/c-dt parser as 3rd party module to the
Tarantool cmake build process.
* Points to tsafin/c-dt instead iof original chansen/c-dt to
have easier build integration, because there is additional
commit which integrated cmake support
---
.gitmodules | 3 +++
CMakeLists.txt | 8 ++++++++
cmake/BuildCDT.cmake | 6 ++++++
src/CMakeLists.txt | 1 +
third_party/c-dt | 1 +
5 files changed, 19 insertions(+)
create mode 100644 cmake/BuildCDT.cmake
create mode 160000 third_party/c-dt
diff --git a/.gitmodules b/.gitmodules
index f2f91ee72..56b236b14 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -43,3 +43,6 @@
[submodule "third_party/xxHash"]
path = third_party/xxHash
url = https://github.com/tarantool/xxHash
+[submodule "third_party/c-dt"]
+ path = third_party/c-dt
+ url = https://github.com/tsafin/c-dt.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9e1a7f79..81ee92933 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -571,6 +571,14 @@ endif()
# zstd
#
+#
+# Chritian Hanson c-dt
+#
+
+include(BuildCDT)
+libccdt_build()
+add_dependencies(build_bundled_libs cdt)
+
#
# Third-Party misc
#
diff --git a/cmake/BuildCDT.cmake b/cmake/BuildCDT.cmake
new file mode 100644
index 000000000..a19abb35c
--- /dev/null
+++ b/cmake/BuildCDT.cmake
@@ -0,0 +1,6 @@
+macro(libccdt_build)
+ set(LIBCDT_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/third_party/c-dt/)
+ set(LIBCDT_LIBRARIES cdt)
+
+ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/c-dt)
+endmacro()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c0e272bd9..ef6a295d5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -202,6 +202,7 @@ set (common_libraries
${ICONV_LIBRARIES}
${OPENSSL_LIBRARIES}
${XXHASH_LIBRARIES}
+ ${LIBCDT_LIBRARIES}
)
if (TARGET_OS_LINUX OR TARGET_OS_DEBIAN_FREEBSD)
diff --git a/third_party/c-dt b/third_party/c-dt
new file mode 160000
index 000000000..8b61c4ea0
--- /dev/null
+++ b/third_party/c-dt
@@ -0,0 +1 @@
+Subproject commit 8b61c4ea006efefc3a068f8df4a156bf5c725c89
--
2.29.2
More information about the Tarantool-patches
mailing list