Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
indiff7643
Terarkdb
提交
43010a92
T
Terarkdb
项目概览
indiff7643
/
Terarkdb
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Terarkdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
43010a92
编写于
4月 04, 2017
作者:
S
Siying Dong
提交者:
Facebook Github Bot
4月 04, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "[rocksdb][PR] CMake: more MinGW fixes"
fbshipit-source-id: 43b4529
上级
a30b75cd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
21 deletion
+25
-21
CMakeLists.txt
CMakeLists.txt
+7
-6
Makefile
Makefile
+2
-2
cmake/modules/FindJeMalloc.cmake
cmake/modules/FindJeMalloc.cmake
+12
-11
cmake/modules/Findsnappy.cmake
cmake/modules/Findsnappy.cmake
+2
-0
db/db_impl.cc
db/db_impl.cc
+1
-1
examples/Makefile
examples/Makefile
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
43010a92
...
...
@@ -41,19 +41,20 @@ endif()
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake/modules/"
)
if
(
MSVC
)
if
(
WIN32
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/thirdparty.inc
)
else
()
option
(
WITH_JEMALLOC
"build with JeMalloc"
OFF
)
if
(
CMAKE_SYSTEM_NAME MATCHES
"FreeBSD"
)
# FreeBSD has jemaloc as default malloc
set
(
WITH_JEMALLOC ON
)
endif
()
if
(
WITH_JEMALLOC
)
find_package
(
JeMalloc REQUIRED
)
add_definitions
(
-DROCKSDB_JEMALLOC
-DJEMALLOC_NO_DEMANGLE
)
add_definitions
(
-DROCKSDB_JEMALLOC
)
include_directories
(
${
JEMALLOC_INCLUDE_DIR
}
)
endif
()
if
(
CMAKE_SYSTEM_NAME STREQUAL
"FreeBSD"
)
# FreeBSD has jemaloc as default malloc
add_definitions
(
-DROCKSDB_JEMALLOC
)
set
(
WITH_JEMALLOC ON
)
endif
()
option
(
WITH_SNAPPY
"build with SNAPPY"
OFF
)
if
(
WITH_SNAPPY
)
find_package
(
snappy REQUIRED
)
...
...
Makefile
浏览文件 @
43010a92
...
...
@@ -204,8 +204,8 @@ endif
ifndef
DISABLE_JEMALLOC
ifdef
JEMALLOC
PLATFORM_CXXFLAGS
+=
"-DROCKSDB_JEMALLOC
-DJEMALLOC_NO_DEMANGLE
"
PLATFORM_CCFLAGS
+=
"-DROCKSDB_JEMALLOC
-DJEMALLOC_NO_DEMANGLE
"
PLATFORM_CXXFLAGS
+=
"-DROCKSDB_JEMALLOC"
PLATFORM_CCFLAGS
+=
"-DROCKSDB_JEMALLOC"
endif
EXEC_LDFLAGS
:=
$(JEMALLOC_LIB)
$(EXEC_LDFLAGS)
PLATFORM_CXXFLAGS
+=
$(JEMALLOC_INCLUDE)
...
...
cmake/modules/FindJeMalloc.cmake
浏览文件 @
43010a92
# - Find JeMalloc library
# Find the native JeMalloc includes and library
# This module defines
# JEMALLOC_INCLUDE_DIRS, where to find jemalloc.h, Set when
# JEMALLOC_INCLUDE_DIR is found.
# JEMALLOC_LIBRARIES, libraries to link against to use JeMalloc.
# JEMALLOC_FOUND, If false, do not try to use JeMalloc.
#
# JEMALLOC_INCLUDE_DIR - where to find jemalloc.h, etc.
# JEMALLOC_LIBRARIES - List of libraries when using jemalloc.
# JEMALLOC_FOUND - True if jemalloc found.
find_path
(
JEMALLOC_INCLUDE_DIR
NAMES jemalloc/jemalloc.h
HINTS
${
JEMALLOC_ROOT_DIR
}
/include
)
jemalloc/jemalloc.h
)
find_library
(
JEMALLOC_LIBRARIES
NAMES jemalloc
HINTS
${
JEMALLOC_ROOT_DIR
}
/lib
)
jemalloc
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
jemalloc DEFAULT_MSG JEMALLOC_LIBRARIES JEMALLOC_INCLUDE_DIR
)
find_package_handle_standard_args
(
JeMalloc DEFAULT_MSG
JEMALLOC_LIBRARIES JEMALLOC_INCLUDE_DIR
)
mark_as_advanced
(
MARK_AS_ADVANCED
(
JEMALLOC_INCLUDE_DIR
JEMALLOC_LIBRARIES
JEMALLOC_INCLUDE_DIR
)
)
cmake/modules/Findsnappy.cmake
浏览文件 @
43010a92
...
...
@@ -13,6 +13,8 @@ find_library(SNAPPY_LIBRARIES
NAMES snappy
HINTS
${
SNAPPY_ROOT_DIR
}
/lib
)
# handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE if
# all listed variables are TRUE
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
snappy DEFAULT_MSG SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR
)
...
...
db/db_impl.cc
浏览文件 @
43010a92
...
...
@@ -597,7 +597,7 @@ static void DumpMallocStats(std::string* stats) {
std
::
unique_ptr
<
char
[]
>
buf
{
new
char
[
kMallocStatusLen
+
1
]};
mstat
.
cur
=
buf
.
get
();
mstat
.
end
=
buf
.
get
()
+
kMallocStatusLen
;
je_
malloc_stats_print
(
GetJemallocStatus
,
&
mstat
,
""
);
malloc_stats_print
(
GetJemallocStatus
,
&
mstat
,
""
);
stats
->
append
(
buf
.
get
());
#endif // ROCKSDB_JEMALLOC
}
...
...
examples/Makefile
浏览文件 @
43010a92
...
...
@@ -2,7 +2,7 @@ include ../make_config.mk
ifndef
DISABLE_JEMALLOC
ifdef
JEMALLOC
PLATFORM_CXXFLAGS
+=
"-DROCKSDB_JEMALLOC
-DJEMALLOC_NO_DEMANGLE
"
PLATFORM_CXXFLAGS
+=
"-DROCKSDB_JEMALLOC"
endif
EXEC_LDFLAGS
:=
$(JEMALLOC_LIB)
$(EXEC_LDFLAGS)
-lpthread
PLATFORM_CXXFLAGS
+=
$(JEMALLOC_INCLUDE)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录