Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
72776ee6
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
72776ee6
编写于
6月 24, 2021
作者:
S
Shengliang Guan
提交者:
GitHub
6月 24, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6573 from taosdata/hotfix/tmq
[TD-4835] change c++ options
上级
84db1dd6
5cadc824
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
39 addition
and
17 deletion
+39
-17
cmake/define.inc
cmake/define.inc
+7
-7
cmake/env.inc
cmake/env.inc
+6
-5
src/client/tests/timeParseTest.cpp
src/client/tests/timeParseTest.cpp
+2
-2
src/query/tests/astTest.cpp
src/query/tests/astTest.cpp
+1
-0
src/query/tests/histogramTest.cpp
src/query/tests/histogramTest.cpp
+4
-0
src/query/tests/patternMatchTest.cpp
src/query/tests/patternMatchTest.cpp
+3
-0
src/query/tests/percentileTest.cpp
src/query/tests/percentileTest.cpp
+3
-0
src/query/tests/resultBufferTest.cpp
src/query/tests/resultBufferTest.cpp
+3
-0
src/query/tests/tsBufTest.cpp
src/query/tests/tsBufTest.cpp
+4
-0
src/query/tests/unitTest.cpp
src/query/tests/unitTest.cpp
+6
-3
未找到文件。
cmake/define.inc
浏览文件 @
72776ee6
...
...
@@ -57,7 +57,7 @@ IF (TD_LINUX_64)
ADD_DEFINITIONS
(
-
D_M_X64
)
ADD_DEFINITIONS
(
-
D_TD_LINUX_64
)
MESSAGE
(
STATUS
"linux64 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -fPIC -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
IF
(
JEMALLOC_ENABLED
)
...
...
@@ -70,7 +70,7 @@ IF (TD_LINUX_32)
ADD_DEFINITIONS
(
-
D_TD_LINUX_32
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"linux32 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -fPIC -fsigned-char -munaligned-access -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -fsigned-char -munaligned-access -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_ARM_64
)
...
...
@@ -78,7 +78,7 @@ IF (TD_ARM_64)
ADD_DEFINITIONS
(
-
D_TD_ARM_
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"arm64 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_ARM_32
)
...
...
@@ -86,7 +86,7 @@ IF (TD_ARM_32)
ADD_DEFINITIONS
(
-
D_TD_ARM_
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"arm32 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types "
)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types "
)
ENDIF
()
IF
(
TD_MIPS_64
)
...
...
@@ -94,7 +94,7 @@ IF (TD_MIPS_64)
ADD_DEFINITIONS
(
-
D_TD_MIPS_64
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"mips64 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_MIPS_32
)
...
...
@@ -102,7 +102,7 @@ IF (TD_MIPS_32)
ADD_DEFINITIONS
(
-
D_TD_MIPS_32
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"mips32 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_APLHINE
)
...
...
@@ -147,7 +147,7 @@ IF (TD_DARWIN_64)
ADD_DEFINITIONS
(
-
D_REENTRANT
-
D__USE_POSIX
-
D_LIBC_REENTRANT
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"darwin64 is defined"
)
SET
(
COMMON_FLAGS
"-
std=gnu99 -
Wall -Werror -Wno-missing-braces -fPIC -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
COMMON_FLAGS
"-Wall -Werror -Wno-missing-braces -fPIC -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
IF
(
TD_MEMORY_SANITIZER
)
SET
(
DEBUG_FLAGS
"-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment -O0 -g3 -DDEBUG"
)
ELSE
()
...
...
cmake/env.inc
浏览文件 @
72776ee6
...
...
@@ -34,13 +34,14 @@ ENDIF ()
#
# Set compiler options
SET
(
CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} ${COMMON_FLAGS} ${DEBUG_FLAGS}"
)
SET
(
CMAKE_C_FLAGS_RELEASE
"${CMAKE_C_FLAGS_RELEASE} ${COMMON_FLAGS} ${RELEASE_FLAGS}"
)
SET
(
COMMON_C_FLAGS
"${COMMON_FLAGS} -std=gnu99"
)
SET
(
CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} ${COMMON_C_FLAGS} ${DEBUG_FLAGS}"
)
SET
(
CMAKE_C_FLAGS_RELEASE
"${CMAKE_C_FLAGS_RELEASE} ${COMMON_C_FLAGS} ${RELEASE_FLAGS}"
)
# Set c++ compiler options
# SET(COMMON_CXX_FLAGS "${COMMON_FLAGS} -std=c++11
")
#
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS} ${DEBUG_FLAGS}")
#
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS} ${RELEASE_FLAGS}")
SET
(
COMMON_CXX_FLAGS
"${COMMON_FLAGS} -std=c++11 -Wno-unused-function
"
)
SET
(
CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS} ${DEBUG_FLAGS}"
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS} ${RELEASE_FLAGS}"
)
IF
(
$
{
CMAKE_BUILD_TYPE
}
MATCHES
"Debug"
)
SET
(
CMAKE_BUILD_TYPE
"Debug"
)
...
...
src/client/tests/timeParseTest.cpp
浏览文件 @
72776ee6
...
...
@@ -98,7 +98,7 @@ TEST(testCase, parse_time) {
taosParseTime
(
t41
,
&
time
,
strlen
(
t41
),
TSDB_TIME_PRECISION_MILLI
,
0
);
EXPECT_EQ
(
time
,
852048000999
);
int64_t
k
=
timezone
;
//
int64_t k = timezone;
char
t42
[]
=
"1997-1-1T0:0:0.999999999Z"
;
taosParseTime
(
t42
,
&
time
,
strlen
(
t42
),
TSDB_TIME_PRECISION_MILLI
,
0
);
EXPECT_EQ
(
time
,
852048000999
-
timezone
*
MILLISECOND_PER_SECOND
);
...
...
@@ -163,7 +163,7 @@ TEST(testCase, parse_time) {
taosParseTime
(
t13
,
&
time
,
strlen
(
t13
),
TSDB_TIME_PRECISION_MILLI
,
0
);
EXPECT_EQ
(
time
,
-
28800
*
MILLISECOND_PER_SECOND
);
char
*
t
=
"2021-01-08T02:11:40.000+00:00"
;
char
t
[]
=
"2021-01-08T02:11:40.000+00:00"
;
taosParseTime
(
t
,
&
time
,
strlen
(
t
),
TSDB_TIME_PRECISION_MILLI
,
0
);
printf
(
"%ld
\n
"
,
time
);
}
...
...
src/query/tests/astTest.cpp
浏览文件 @
72776ee6
...
...
@@ -10,6 +10,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wwrite-strings"
#pragma GCC diagnostic ignored "-Wunused-function"
typedef
struct
ResultObj
{
int32_t
numOfResult
;
...
...
src/query/tests/histogramTest.cpp
浏览文件 @
72776ee6
...
...
@@ -5,6 +5,10 @@
#include "taos.h"
#include "qHistogram.h"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
namespace
{
void
doHistogramAddTest
()
{
SHistogramInfo
*
pHisto
=
NULL
;
...
...
src/query/tests/patternMatchTest.cpp
浏览文件 @
72776ee6
...
...
@@ -6,6 +6,9 @@
#include "qAggMain.h"
#include "tcompare.h"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
TEST
(
testCase
,
patternMatchTest
)
{
SPatternCompareInfo
info
=
PATTERN_COMPARE_INFO_INITIALIZER
;
...
...
src/query/tests/percentileTest.cpp
浏览文件 @
72776ee6
...
...
@@ -7,6 +7,9 @@
#include "qPercentile.h"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
namespace
{
tMemBucket
*
createBigIntDataBucket
(
int32_t
start
,
int32_t
end
)
{
tMemBucket
*
pBucket
=
tMemBucketCreate
(
sizeof
(
int64_t
),
TSDB_DATA_TYPE_BIGINT
,
start
,
end
);
...
...
src/query/tests/resultBufferTest.cpp
浏览文件 @
72776ee6
...
...
@@ -6,6 +6,9 @@
#include "taos.h"
#include "tsdb.h"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
namespace
{
// simple test
void
simpleTest
()
{
...
...
src/query/tests/tsBufTest.cpp
浏览文件 @
72776ee6
...
...
@@ -9,6 +9,10 @@
#include "ttoken.h"
#include "tutil.h"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
namespace
{
/**
*
...
...
src/query/tests/unitTest.cpp
浏览文件 @
72776ee6
...
...
@@ -6,14 +6,17 @@
#include "taos.h"
#include "tsdb.h"
#pragma GCC diagnostic ignored "-Wwrite-strings"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wsign-compare"
#include "../../client/inc/tscUtil.h"
#include "tutil.h"
#include "tvariant.h"
#include "ttokendef.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wwrite-strings"
namespace
{
int32_t
testValidateName
(
char
*
name
)
{
SStrToken
token
=
{
0
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录