Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
毕竟曾有刹那
Mace
提交
2a1418e6
Mace
项目概览
毕竟曾有刹那
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2a1418e6
编写于
6月 14, 2019
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable ccache in build
上级
03acb83b
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
24 addition
and
2 deletion
+24
-2
CMakeLists.txt
CMakeLists.txt
+9
-0
docker/mace-dev/Dockerfile
docker/mace-dev/Dockerfile
+3
-0
third_party/gflags/gflags.cmake
third_party/gflags/gflags.cmake
+3
-0
third_party/googletest/googletest.cmake
third_party/googletest/googletest.cmake
+4
-1
third_party/protobuf/protobuf.cmake
third_party/protobuf/protobuf.cmake
+5
-1
未找到文件。
CMakeLists.txt
浏览文件 @
2a1418e6
...
...
@@ -15,9 +15,18 @@ option(MACE_ENABLE_BENCHMARKS "whether to build c++ micro benchmarks" OFF)
option
(
MACE_ENABLE_EXAMPLES
"whether to build examples"
OFF
)
option
(
MACE_ENABLE_OPT_SIZE
"whether to build with optimized binary size"
ON
)
option
(
MACE_ENABLE_OBFUSCATE
"whether to build with code obfuscation"
ON
)
option
(
MACE_ENABLE_CCACHE
"whether to build with ccache"
ON
)
message
(
"CMAKE_INSTALL_PREFIX:
${
CMAKE_INSTALL_PREFIX
}
"
)
if
(
MACE_ENABLE_CCACHE
)
find_program
(
CCACHE_FOUND ccache
)
if
(
CCACHE_FOUND
)
set
(
CMAKE_CXX_COMPILER_LAUNCHER ccache
)
set
(
CMAKE_C_COMPILER_LAUNCHER ccache
)
endif
(
CCACHE_FOUND
)
endif
(
MACE_ENABLE_CCACHE
)
# TODO make these flags well defined and organized
# TODO enable sanitizer
set
(
MACE_CC_FLAGS
"
${
MACE_CC_FLAGS
}
-fPIC"
)
...
...
docker/mace-dev/Dockerfile
浏览文件 @
2a1418e6
...
...
@@ -111,3 +111,6 @@ RUN pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
cpplint
==
1.4.4
RUN
apt-get
install
-y
--no-install-recommends
\
ccache
third_party/gflags/gflags.cmake
浏览文件 @
2a1418e6
...
...
@@ -24,6 +24,9 @@ ExternalProject_Add(
UPDATE_COMMAND
""
BUILD_BYPRODUCTS
${
GFLAGS_LIBRARIES
}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
GFLAGS_INSTALL_DIR
}
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_CXX_COMPILER_LAUNCHER=
${
CMAKE_CXX_COMPILER_LAUNCHER
}
-DCMAKE_C_COMPILER_LAUNCHER=
${
CMAKE_C_COMPILER_LAUNCHER
}
-DBUILD_STATIC_LIBS=ON
-DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
...
...
third_party/googletest/googletest.cmake
浏览文件 @
2a1418e6
...
...
@@ -32,7 +32,10 @@ if(MACE_ENABLE_TESTS)
PREFIX
${
GTEST_SOURCES_DIR
}
UPDATE_COMMAND
""
BUILD_BYPRODUCTS
${
GTEST_LIBRARIES
}
${
GTEST_MAIN_LIBRARIES
}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
GTEST_INSTALL_DIR
}
CMAKE_ARGS -DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_CXX_COMPILER_LAUNCHER=
${
CMAKE_CXX_COMPILER_LAUNCHER
}
-DCMAKE_C_COMPILER_LAUNCHER=
${
CMAKE_C_COMPILER_LAUNCHER
}
-DCMAKE_INSTALL_PREFIX=
${
GTEST_INSTALL_DIR
}
-DBUILD_GMOCK=ON
-Dgtest_disable_pthreads=ON
-Dgtest_force_shared_crt=ON
...
...
third_party/protobuf/protobuf.cmake
浏览文件 @
2a1418e6
...
...
@@ -33,7 +33,9 @@ ExternalProject_Add(
BUILD_BYPRODUCTS
${
PROTOBUF_LITE_LIBRARIES
}
SOURCE_DIR
"
${
PROTOBUF_SRCS_DIR
}
/src/protobuf"
CONFIGURE_COMMAND
${
CMAKE_COMMAND
}
../protobuf/cmake/
#-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_CXX_COMPILER_LAUNCHER=
${
CMAKE_CXX_COMPILER_LAUNCHER
}
-DCMAKE_C_COMPILER_LAUNCHER=
${
CMAKE_C_COMPILER_LAUNCHER
}
-DCMAKE_INSTALL_PREFIX=
${
PROTOBUF_INSTALL_DIR
}
-DCMAKE_VERBOSE_MAKEFILE=OFF
-Dprotobuf_BUILD_TESTS=OFF
...
...
@@ -90,6 +92,8 @@ if(BUILD_PROTOC)
SOURCE_DIR
"
${
PROTOC_SRCS_DIR
}
/src/protoc"
CONFIGURE_COMMAND
${
CMAKE_COMMAND
}
../protoc/cmake/
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_COMPILER_LAUNCHER=
${
CMAKE_CXX_COMPILER_LAUNCHER
}
-DCMAKE_C_COMPILER_LAUNCHER=
${
CMAKE_C_COMPILER_LAUNCHER
}
-DCMAKE_INSTALL_PREFIX=
${
PROTOC_INSTALL_DIR
}
-DCMAKE_VERBOSE_MAKEFILE=OFF
-Dprotobuf_BUILD_TESTS=OFF
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录