Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
796f43dc
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
未验证
提交
796f43dc
编写于
10月 12, 2021
作者:
Y
Yang Zhao
提交者:
GitHub
10月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix taosdump/taosdemo version (#8144)
上级
0aa35d38
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
66 addition
and
10 deletion
+66
-10
src/kit/taosdemo/CMakeLists.txt
src/kit/taosdemo/CMakeLists.txt
+7
-6
src/kit/taosdump/CMakeLists.txt
src/kit/taosdump/CMakeLists.txt
+59
-4
未找到文件。
src/kit/taosdemo/CMakeLists.txt
浏览文件 @
796f43dc
...
...
@@ -8,12 +8,14 @@ IF (GIT_FOUND)
MESSAGE
(
"Git found"
)
EXECUTE_PROCESS
(
COMMAND
${
GIT_EXECUTABLE
}
log --pretty=oneline -n 1
${
CMAKE_CURRENT_LIST_DIR
}
/taosdemo.c
WORKING_DIRECTORY
${
CMAKE_CURRENT_LIST_DIR
}
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE TAOSDEMO_COMMIT_SHA1
)
IF
(
"
${
TAOSDEMO_COMMIT_SHA1
}
"
STREQUAL
""
)
MESSAGE
(
"taosdemo's latest commit in short is:"
${
TAOSDEMO_COMMIT_SHA1
}
)
SET
(
TAOSDEMO_COMMIT_SHA1
"unknown"
)
ELSE
()
STRING
(
SUBSTRING
"
${
TAOSDEMO_COMMIT_SHA1
}
"
0 7 TAOSDEMO_COMMIT_SHA1
)
STRING
(
STRIP
"
${
TAOSDEMO_COMMIT_SHA1
}
"
TAOSDEMO_COMMIT_SHA1
)
ENDIF
()
EXECUTE_PROCESS
(
COMMAND
${
GIT_EXECUTABLE
}
status -z -s
${
CMAKE_CURRENT_LIST_DIR
}
/taosdemo.c
...
...
@@ -25,14 +27,13 @@ IF (GIT_FOUND)
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE TAOSDEMO_STATUS
)
ENDIF
(
TD_LINUX
)
MESSAGE
(
"taosdemo.c status: "
${
TAOSDEMO_STATUS
}
)
ELSE
()
MESSAGE
(
"Git not found"
)
SET
(
TAOSDEMO_COMMIT_SHA1
"unknown"
)
SET
(
TAOSDEMO_STATUS
"unknown"
)
ENDIF
(
GIT_FOUND
)
STRING
(
STRIP
"
${
TAOSDEMO_COMMIT_SHA1
}
"
TAOSDEMO_COMMIT_SHA1
)
MESSAGE
(
"taosdemo's latest commit in short is:"
${
TAOSDEMO_COMMIT_SHA1
}
)
STRING
(
STRIP
"
${
TAOSDEMO_STATUS
}
"
TAOSDEMO_STATUS
)
...
...
@@ -46,11 +47,11 @@ MESSAGE("taosdemo's status is:" ${TAOSDEMO_STATUS})
ADD_DEFINITIONS
(
-DTAOSDEMO_COMMIT_SHA1=
"
${
TAOSDEMO_COMMIT_SHA1
}
"
)
ADD_DEFINITIONS
(
-DTAOSDEMO_STATUS=
"
${
TAOSDEMO_STATUS
}
"
)
MESSAGE
(
"
VERNUMBER is:"
${
VER
NUMBER
}
)
IF
(
"
${
VER
NUMBER
}
"
STREQUAL
""
)
MESSAGE
(
"
TD_VER_NUMBER is:"
${
TD_VER_
NUMBER
}
)
IF
(
"
${
TD_VER_
NUMBER
}
"
STREQUAL
""
)
SET
(
TD_VERSION_NUMBER
"TDengine-version-unknown"
)
ELSE
()
SET
(
TD_VERSION_NUMBER
${
VER
NUMBER
}
)
SET
(
TD_VERSION_NUMBER
${
TD_VER_
NUMBER
}
)
ENDIF
()
MESSAGE
(
"TD_VERSION_NUMBER is:"
${
TD_VERSION_NUMBER
}
)
ADD_DEFINITIONS
(
-DTD_VERNUMBER=
"
${
TD_VERSION_NUMBER
}
"
)
...
...
src/kit/taosdump/CMakeLists.txt
浏览文件 @
796f43dc
...
...
@@ -6,12 +6,67 @@ INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/query/inc)
INCLUDE_DIRECTORIES
(
inc
)
AUX_SOURCE_DIRECTORY
(
. SRC
)
FIND_PACKAGE
(
Git
)
IF
(
GIT_FOUND
)
EXECUTE_PROCESS
(
COMMAND
${
GIT_EXECUTABLE
}
log --pretty=oneline -n 1
${
CMAKE_CURRENT_LIST_DIR
}
/taosdump.c
WORKING_DIRECTORY
${
CMAKE_CURRENT_LIST_DIR
}
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE TAOSDUMP_COMMIT_SHA1
)
IF
(
"
${
TAOSDUMP_COMMIT_SHA1
}
"
STREQUAL
""
)
SET
(
TAOSDUMP_COMMIT_SHA1
"unknown"
)
ELSE
()
STRING
(
SUBSTRING
"
${
TAOSDUMP_COMMIT_SHA1
}
"
0 7 TAOSDUMP_COMMIT_SHA1
)
STRING
(
STRIP
"
${
TAOSDUMP_COMMIT_SHA1
}
"
TAOSDUMP_COMMIT_SHA1
)
ENDIF
()
EXECUTE_PROCESS
(
COMMAND
${
GIT_EXECUTABLE
}
status -z -s
${
CMAKE_CURRENT_LIST_DIR
}
/taosdump.c
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE TAOSDUMP_STATUS
)
IF
(
TD_LINUX
)
EXECUTE_PROCESS
(
COMMAND bash
"-c"
"echo '
${
TAOSDUMP_STATUS
}
' | awk '{print $1}'"
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE TAOSDUMP_STATUS
)
ENDIF
(
TD_LINUX
)
ELSE
()
MESSAGE
(
"Git not found"
)
SET
(
TAOSDUMP_COMMIT_SHA1
"unknown"
)
SET
(
TAOSDUMP_STATUS
"unknown"
)
ENDIF
(
GIT_FOUND
)
MESSAGE
(
"taosdump's latest commit in short is:"
${
TAOSDUMP_COMMIT_SHA1
}
)
STRING
(
STRIP
"
${
TAOSDUMP_STATUS
}
"
TAOSDUMP_STATUS
)
IF
(
TAOSDUMP_STATUS MATCHES
"M"
)
SET
(
TAOSDUMP_STATUS
"modified"
)
ELSE
()
SET
(
TAOSDUMP_STATUS
""
)
ENDIF
()
MESSAGE
(
"taosdump's status is:"
${
TAOSDUMP_STATUS
}
)
ADD_DEFINITIONS
(
-DTAOSDUMP_COMMIT_SHA1=
"
${
TAOSDUMP_COMMIT_SHA1
}
"
)
ADD_DEFINITIONS
(
-DTAOSDUMP_STATUS=
"
${
TAOSDUMP_STATUS
}
"
)
MESSAGE
(
"TD_VER_NUMBER is:"
${
TD_VER_NUMBER
}
)
IF
(
"
${
TD_VER_NUMBER
}
"
STREQUAL
""
)
SET
(
TD_VERSION_NUMBER
"TDengine-version-unknown"
)
ELSE
()
SET
(
TD_VERSION_NUMBER
${
TD_VER_NUMBER
}
)
ENDIF
()
MESSAGE
(
"TD_VERSION_NUMBER is:"
${
TD_VERSION_NUMBER
}
)
ADD_DEFINITIONS
(
-DTD_VERNUMBER=
"
${
TD_VERSION_NUMBER
}
"
)
IF
(
TD_LINUX
)
ADD_EXECUTABLE
(
taosdump
${
SRC
}
)
IF
(
TD_SOMODE_STATIC
)
TARGET_LINK_LIBRARIES
(
taosdump taos_static
)
TARGET_LINK_LIBRARIES
(
taosdump taos_static
cJson
)
ELSE
()
TARGET_LINK_LIBRARIES
(
taosdump taos
)
TARGET_LINK_LIBRARIES
(
taosdump taos
cJson
)
ENDIF
()
ENDIF
()
...
...
@@ -19,8 +74,8 @@ IF (TD_DARWIN)
# missing <argp.h> for macosx
# ADD_EXECUTABLE(taosdump ${SRC})
# IF (TD_SOMODE_STATIC)
# TARGET_LINK_LIBRARIES(taosdump taos_static)
# TARGET_LINK_LIBRARIES(taosdump taos_static
cJson
)
# ELSE ()
# TARGET_LINK_LIBRARIES(taosdump taos)
# TARGET_LINK_LIBRARIES(taosdump taos
cJson
)
# ENDIF ()
ENDIF
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录