Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
84e6f48b
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
84e6f48b
编写于
6月 15, 2022
作者:
X
Xuefeng Tan
提交者:
GitHub
6月 15, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(taosAdapter): taosAdapter for 3.0 (#13856)
上级
86fe2baf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
123 addition
and
0 deletion
+123
-0
.gitmodules
.gitmodules
+3
-0
cmake/cmake.define
cmake/cmake.define
+27
-0
tools/CMakeLists.txt
tools/CMakeLists.txt
+92
-0
tools/taosadapter
tools/taosadapter
+1
-0
未找到文件。
.gitmodules
浏览文件 @
84e6f48b
...
...
@@ -16,3 +16,6 @@
[submodule "tools/taos-tools"]
path = tools/taos-tools
url = https://github.com/taosdata/taos-tools
[submodule "tools/taosadapter"]
path = tools/taosadapter
url = https://github.com/taosdata/taosadapter.git
cmake/cmake.define
浏览文件 @
84e6f48b
...
...
@@ -18,6 +18,33 @@ if (NOT DEFINED TD_GRANT)
SET(TD_GRANT FALSE)
endif()
IF ("${BUILD_HTTP}" STREQUAL "")
IF (TD_LINUX)
IF (TD_ARM_32)
SET(TD_BUILD_HTTP TRUE)
ELSE ()
SET(TD_BUILD_HTTP TRUE)
ENDIF ()
ELSEIF (TD_DARWIN)
SET(TD_BUILD_HTTP TRUE)
ELSE ()
SET(TD_BUILD_HTTP TRUE)
ENDIF ()
ELSEIF (${BUILD_HTTP} MATCHES "false")
SET(TD_BUILD_HTTP FALSE)
ELSEIF (${BUILD_HTTP} MATCHES "true")
SET(TD_BUILD_HTTP TRUE)
ELSEIF (${BUILD_HTTP} MATCHES "internal")
SET(TD_BUILD_HTTP FALSE)
SET(TD_BUILD_TAOSA_INTERNAL TRUE)
ELSE ()
SET(TD_BUILD_HTTP TRUE)
ENDIF ()
IF (TD_BUILD_HTTP)
ADD_DEFINITIONS(-DHTTP_EMBEDDED)
ENDIF ()
IF ("${BUILD_TOOLS}" STREQUAL "")
IF (TD_LINUX)
IF (TD_ARM_32)
...
...
tools/CMakeLists.txt
浏览文件 @
84e6f48b
...
...
@@ -9,3 +9,95 @@ IF (TD_TAOS_TOOLS)
ENDIF
()
add_subdirectory
(
shell
)
IF
(
TD_BUILD_HTTP
)
MESSAGE
(
""
)
MESSAGE
(
"
${
Yellow
}
use original embedded httpd
${
ColourReset
}
"
)
MESSAGE
(
""
)
# ADD_SUBDIRECTORY(http)
ELSEIF
(
TD_BUILD_TAOSA_INTERNAL
)
MESSAGE
(
"
${
Yellow
}
use taosa internal as httpd
${
ColourReset
}
"
)
ELSE
()
MESSAGE
(
""
)
MESSAGE
(
"
${
Green
}
use taosadapter as httpd, platform is
${
PLATFORM_ARCH_STR
}
${
ColourReset
}
"
)
EXECUTE_PROCESS
(
COMMAND git rev-parse --abbrev-ref HEAD
RESULT_VARIABLE result_taos_version
OUTPUT_VARIABLE taos_version
)
STRING
(
FIND
${
taos_version
}
release is_release_branch
)
IF
(
"
${
is_release_branch
}
"
STREQUAL
"0"
)
STRING
(
SUBSTRING
"
${
taos_version
}
"
12 -1 taos_version
)
STRING
(
STRIP
"
${
taos_version
}
"
taos_version
)
ELSE
()
STRING
(
CONCAT taos_version
"_branch_"
"
${
taos_version
}
"
)
STRING
(
STRIP
"
${
taos_version
}
"
taos_version
)
ENDIF
()
EXECUTE_PROCESS
(
COMMAND cd
${
CMAKE_CURRENT_SOURCE_DIR
}
/taosadapter
)
EXECUTE_PROCESS
(
COMMAND git rev-parse --short HEAD
RESULT_VARIABLE commit_sha1
OUTPUT_VARIABLE taosadapter_commit_sha1
)
IF
(
"
${
taosadapter_commit_sha1
}
"
STREQUAL
""
)
SET
(
taosadapter_commit_sha1
"unknown"
)
ELSE
()
STRING
(
SUBSTRING
"
${
taosadapter_commit_sha1
}
"
0 7 taosadapter_commit_sha1
)
STRING
(
STRIP
"
${
taosadapter_commit_sha1
}
"
taosadapter_commit_sha1
)
ENDIF
()
MESSAGE
(
"
${
Green
}
taosAdapter will use
${
taos_version
}
and commit
${
taosadapter_commit_sha1
}
as version
${
ColourReset
}
"
)
EXECUTE_PROCESS
(
COMMAND cd ..
)
MESSAGE
(
"CURRENT SOURCE DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
IF
(
TD_LINUX
)
include
(
ExternalProject
)
ExternalProject_Add
(
taosadapter
PREFIX
"taosadapter"
SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/taosadapter
BUILD_ALWAYS off
DEPENDS taos
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND cmake -E echo
"taosadapter no need cmake to config"
PATCH_COMMAND
COMMAND git clean -f -d
BUILD_COMMAND
COMMAND CGO_CFLAGS=-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../include/client CGO_LDFLAGS=-L
${
CMAKE_BINARY_DIR
}
/build/lib go build -a -ldflags
"-s -w -X github.com/taosdata/taosadapter/version.Version=
${
taos_version
}
-X github.com/taosdata/taosadapter/version.CommitID=
${
taosadapter_commit_sha1
}
"
COMMAND CGO_CFLAGS=-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../include/client CGO_LDFLAGS=-L
${
CMAKE_BINARY_DIR
}
/build/lib go build -a -o taosadapter-debug -ldflags
"-X github.com/taosdata/taosadapter/version.Version=
${
taos_version
}
-X github.com/taosdata/taosadapter/version.CommitID=
${
taosadapter_commit_sha1
}
"
INSTALL_COMMAND
COMMAND curl -sL https://github.com/upx/upx/releases/download/v3.96/upx-3.96-
${
PLATFORM_ARCH_STR
}
_linux.tar.xz -o upx.tar.xz && tar -xvJf upx.tar.xz -C
${
CMAKE_BINARY_DIR
}
--strip-components 1 > /dev/null &&
${
CMAKE_BINARY_DIR
}
/upx taosadapter || :
COMMAND cmake -E copy taosadapter
${
CMAKE_BINARY_DIR
}
/build/bin
COMMAND cmake -E make_directory
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./example/config/taosadapter.toml
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./taosadapter.service
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy taosadapter-debug
${
CMAKE_BINARY_DIR
}
/build/bin
)
ELSEIF
(
TD_DARWIN
)
include
(
ExternalProject
)
ExternalProject_Add
(
taosadapter
PREFIX
"taosadapter"
SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/taosadapter
BUILD_ALWAYS off
DEPENDS taos
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND cmake -E echo
"taosadapter no need cmake to config"
PATCH_COMMAND
COMMAND git clean -f -d
BUILD_COMMAND
COMMAND CGO_CFLAGS=-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../include/client CGO_LDFLAGS=-L
${
CMAKE_BINARY_DIR
}
/build/lib go build -a -ldflags
"-s -w -X github.com/taosdata/taosadapter/version.Version=
${
taos_version
}
-X github.com/taosdata/taosadapter/version.CommitID=
${
taosadapter_commit_sha1
}
"
COMMAND CGO_CFLAGS=-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../include/client CGO_LDFLAGS=-L
${
CMAKE_BINARY_DIR
}
/build/lib go build -a -o taosadapter-debug -ldflags
"-X github.com/taosdata/taosadapter/version.Version=
${
taos_version
}
-X github.com/taosdata/taosadapter/version.CommitID=
${
taosadapter_commit_sha1
}
"
INSTALL_COMMAND
COMMAND cmake -E copy taosadapter
${
CMAKE_BINARY_DIR
}
/build/bin
COMMAND cmake -E make_directory
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./example/config/taosadapter.toml
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./taosadapter.service
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy taosadapter-debug
${
CMAKE_BINARY_DIR
}
/build/bin
)
ELSE
()
MESSAGE
(
"
${
Yellow
}
Windows system still use original embedded httpd
${
ColourReset
}
"
)
ENDIF
()
ENDIF
()
taosadapter
@
9ce3f5c9
Subproject commit 9ce3f5c98ef95d9c7c596c4ed7302b0ed69a92b2
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录