Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kvdb
rocksdb
提交
ac25fe6b
R
rocksdb
项目概览
kvdb
/
rocksdb
大约 1 年 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rocksdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ac25fe6b
编写于
10月 20, 2015
作者:
S
Siying Dong
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #779 from yuslepukhin/optimize_windows_build
Do not build test only code and unit tests in Release builds
上级
e3d4e140
e154ee08
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
52 addition
and
11 deletion
+52
-11
CMakeLists.txt
CMakeLists.txt
+50
-9
appveyor.yml
appveyor.yml
+1
-1
appveyordailytests.yml
appveyordailytests.yml
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
ac25fe6b
...
...
@@ -14,10 +14,15 @@
# 3. Run cmake to generate project files for Windows, add more options to enable required third-party libraries.
# See thirdparty.inc for more information.
# sample command: cmake -G "Visual Studio 12 Win64" -DGFLAGS=1 -DSNAPPY=1 -DJEMALLOC=1 ..
# 4. Then build the project in debug mode (you may want to add /m:<N> flag to run msbuild in <N> parallel threads)
# msbuild ALL_BUILD.vcxproj
# 4. Then build the project in debug mode (you may want to add /m[:<N>] flag to run msbuild in <N> parallel threads
# or simply /m ot use all avail cores)
# msbuild rocksdb.sln
#
# rocksdb.sln build features exclusions of test only code in Release. If you build ALL_BUILD then everything
# will be attempted but test only code does not build in Release mode.
#
# 5. And release mode (/m[:<N>] is also supported)
# msbuild
ALL_BUILD.vcxproj
/p:Configuration=Release
# msbuild
rocksdb.sln
/p:Configuration=Release
#
cmake_minimum_required
(
VERSION 2.6
)
...
...
@@ -83,6 +88,7 @@ set(LIBS ${ROCKSDB_LIBS} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
add_subdirectory
(
third-party/gtest-1.7.0/fused-src/gtest
)
# Main library source code
set
(
SOURCES
db/builder.cc
db/c.cc
...
...
@@ -100,7 +106,6 @@ set(SOURCES
db/db_impl_experimental.cc
db/db_impl_readonly.cc
db/db_iter.cc
db/db_test_util.cc
db/event_helpers.cc
db/experimental.cc
db/filename.cc
...
...
@@ -252,6 +257,12 @@ set(SOURCES
utilities/write_batch_with_index/write_batch_with_index_internal.cc
)
# For test util library that is build only in DEBUG mode
# and linked to tests. Add test only code that is not #ifdefed for Release here.
set
(
TESTUTIL_SOURCE
db/db_test_util.cc
)
add_library
(
rocksdblib
${
ARTIFACT_SUFFIX
}
${
SOURCES
}
)
set_target_properties
(
rocksdblib
${
ARTIFACT_SUFFIX
}
PROPERTIES COMPILE_FLAGS
"/Fd
${
CMAKE_CFG_INTDIR
}
/rocksdblib
${
ARTIFACT_SUFFIX
}
.pdb"
)
add_dependencies
(
rocksdblib
${
ARTIFACT_SUFFIX
}
GenerateBuildVersion
)
...
...
@@ -367,7 +378,7 @@ set(TESTS
utilities/write_batch_with_index/write_batch_with_index_test.cc
)
set
(
EXES
${
APPS
}
${
TESTS
}
)
set
(
EXES
${
APPS
}
)
foreach
(
sourcefile
${
EXES
}
)
string
(
REPLACE
".cc"
""
exename
${
sourcefile
}
)
...
...
@@ -376,12 +387,42 @@ foreach(sourcefile ${EXES})
target_link_libraries
(
${
exename
}${
ARTIFACT_SUFFIX
}
${
LIBS
}
)
endforeach
(
sourcefile
${
EXES
}
)
# test utilities are only build in debug
set
(
TESTUTILLIB testutillib
${
ARTIFACT_SUFFIX
}
)
add_library
(
${
TESTUTILLIB
}
STATIC
${
TESTUTIL_SOURCE
}
)
set_target_properties
(
${
TESTUTILLIB
}
PROPERTIES COMPILE_FLAGS
"/Fd
${
CMAKE_CFG_INTDIR
}
/testutillib
${
ARTIFACT_SUFFIX
}
.pdb"
)
set_target_properties
(
${
TESTUTILLIB
}
PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD_RELEASE 1
EXCLUDE_FROM_DEFAULT_BUILD_MINRELEASE 1
EXCLUDE_FROM_DEFAULT_BUILD_RELWITHDEBINFO 1
)
# Tests are excluded from Release builds
set
(
TEST_EXES
${
TESTS
}
)
foreach
(
sourcefile
${
TEST_EXES
}
)
string
(
REPLACE
".cc"
""
exename
${
sourcefile
}
)
string
(
REGEX REPLACE
"^((.+)/)+"
""
exename
${
exename
}
)
add_executable
(
${
exename
}${
ARTIFACT_SUFFIX
}
${
sourcefile
}
)
set_target_properties
(
${
exename
}${
ARTIFACT_SUFFIX
}
PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD_RELEASE 1
EXCLUDE_FROM_DEFAULT_BUILD_MINRELEASE 1
EXCLUDE_FROM_DEFAULT_BUILD_RELWITHDEBINFO 1
)
target_link_libraries
(
${
exename
}${
ARTIFACT_SUFFIX
}
${
LIBS
}
testutillib
${
ARTIFACT_SUFFIX
}
)
endforeach
(
sourcefile
${
TEST_EXES
}
)
# C executables must link to a shared object
set
(
C_EXES
${
C_TESTS
}
)
set
(
C_
TEST_
EXES
${
C_TESTS
}
)
foreach
(
sourcefile
${
C_EXES
}
)
foreach
(
sourcefile
${
C_
TEST_
EXES
}
)
string
(
REPLACE
".c"
""
exename
${
sourcefile
}
)
string
(
REGEX REPLACE
"^((.+)/)+"
""
exename
${
exename
}
)
add_executable
(
${
exename
}${
ARTIFACT_SUFFIX
}
${
sourcefile
}
)
target_link_libraries
(
${
exename
}${
ARTIFACT_SUFFIX
}
rocksdb
${
ARTIFACT_SUFFIX
}
)
endforeach
(
sourcefile
${
C_TESTS
}
)
set_target_properties
(
${
exename
}${
ARTIFACT_SUFFIX
}
PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD_RELEASE 1
EXCLUDE_FROM_DEFAULT_BUILD_MINRELEASE 1
EXCLUDE_FROM_DEFAULT_BUILD_RELWITHDEBINFO 1
)
target_link_libraries
(
${
exename
}${
ARTIFACT_SUFFIX
}
rocksdb
${
ARTIFACT_SUFFIX
}
testutillib
${
ARTIFACT_SUFFIX
}
)
endforeach
(
sourcefile
${
C_TEST_EXES
}
)
appveyor.yml
浏览文件 @
ac25fe6b
...
...
@@ -5,7 +5,7 @@ before_build:
-
cmake -G "Visual Studio 12 Win64" ..
-
cd ..
build
:
project
:
build\
ALL_BUILD.vcxproj
project
:
build\
rocksdb.sln
parallel
:
true
verbosity
:
minimal
test
:
off
appveyordailytests.yml
浏览文件 @
ac25fe6b
...
...
@@ -5,7 +5,7 @@ before_build:
-
cmake -G "Visual Studio 12 Win64" -DOPTDBG=1 ..
-
cd ..
build
:
project
:
build\
ALL_BUILD.vcxproj
project
:
build\
rocksdb.sln
parallel
:
true
verbosity
:
minimal
test
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录