Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
ac271096
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ac271096
编写于
12月 13, 2016
作者:
Y
Yi Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use @ instead of //external to refer to external dependencies, so to standardize include paths.
上级
ca476f48
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
181 addition
and
3 deletion
+181
-3
WORKSPACE
WORKSPACE
+9
-0
third_party/gflags_test/BUILD
third_party/gflags_test/BUILD
+1
-1
third_party/glog.BUILD
third_party/glog.BUILD
+169
-0
third_party/gtest.BUILD
third_party/gtest.BUILD
+1
-1
third_party/protobuf_test/BUILD
third_party/protobuf_test/BUILD
+1
-1
未找到文件。
WORKSPACE
浏览文件 @
ac271096
...
@@ -23,3 +23,12 @@ git_repository(
...
@@ -23,3 +23,12 @@ git_repository(
tag
=
"v2.2.0"
,
tag
=
"v2.2.0"
,
remote
=
"https://github.com/gflags/gflags.git"
remote
=
"https://github.com/gflags/gflags.git"
)
)
# External dependency to glog. This method comes from
# https://github.com/reyoung/bazel_playground/blob/master/WORKSPACE
new_git_repository
(
name
=
"glog"
,
remote
=
"https://github.com/google/glog.git"
,
commit
=
"b6a5e0524c28178985f0d228e9eaa43808dbec3c"
,
build_file
=
"third_party/glog.BUILD"
)
third_party/gflags_test/BUILD
浏览文件 @
ac271096
...
@@ -5,7 +5,7 @@ cc_test(
...
@@ -5,7 +5,7 @@ cc_test(
srcs
=
[
"gflags_test.cc"
],
srcs
=
[
"gflags_test.cc"
],
copts
=
[
"-Iexternal/gtest/include"
],
copts
=
[
"-Iexternal/gtest/include"
],
deps
=
[
deps
=
[
"@gtest//:
main
"
,
"@gtest//:
gtest
"
,
"@gflags//:gflags"
,
"@gflags//:gflags"
,
],
],
)
)
third_party/glog.BUILD
0 → 100644
浏览文件 @
ac271096
licenses(["notice"])
cc_library(
visibility = ["//visibility:public"],
name = "glog",
deps = [
#"//third_party/libunwind:libunwind-k8",
"@gflags//:gflags",
],
includes = [
".",
"src",
],
copts = [
"-D_START_GOOGLE_NAMESPACE_='namespace google {'",
"-D_END_GOOGLE_NAMESPACE_='}'",
"-DGOOGLE_NAMESPACE='google'",
"-DGOOGLE_GLOG_DLL_DECL=''",
"-DHAVE_DLADDR",
"-DHAVE_SNPRINTF",
"-DHAVE_DLFCN_H",
"-DHAVE_FCNTL",
"-DHAVE_GLOB_H",
"-DHAVE_INTTYPES_H",
"-DHAVE_LIBPTHREAD",
"-DHAVE_SYS_SYSCALL_H",
#"-DHAVE_LIBUNWIND_H",
"-DHAVE_LIB_GFLAGS",
#"-DHAVE_LIB_UNWIND",
"-DHAVE_MEMORY_H",
"-DHAVE_NAMESPACES",
"-DHAVE_PREAD",
"-DHAVE_PTHREAD",
"-DHAVE_PWD_H",
"-DHAVE_PWRITE",
"-DHAVE_RWLOCK",
"-DHAVE_SIGACTION",
"-DHAVE_SIGALTSTACK",
"-DHAVE_STDINT_H",
"-DHAVE_STRING_H",
"-DHAVE_SYS_TIME_H",
"-DHAVE_SYS_TYPES_H",
"-DHAVE_SYS_UCONTEXT_H",
"-DHAVE_SYS_UTSNAME_H",
"-DHAVE_UNISTD_H",
"-DHAVE_USING_OPERATOR",
"-DHAVE_HAVE___ATTRIBUTE___",
"-DHAVE_HAVE___BUILTIN_EXPECT",
#"-DNO_FRAME_POINTER",
"-D_GNU_SOURCE",
#"-fno-sanitize=thread",
#"-fno-sanitize=address",
"-Iexternal/glog/src",
#"-I/usr/local/include", # XXX import libunwind
],
srcs = [
"src/demangle.cc",
"src/logging.cc",
"src/raw_logging.cc",
"src/signalhandler.cc",
"src/symbolize.cc",
"src/utilities.cc",
"src/vlog_is_on.cc",
":config_h",
":logging_h",
":raw_logging_h",
":stl_logging_h",
":vlog_is_on_h",
],
hdrs = [
"src/demangle.h",
"src/mock-log.h",
"src/stacktrace.h",
#"src/stacktrace_libunwind-inl.h",
"src/symbolize.h",
"src/utilities.h",
"src/base/commandlineflags.h",
"src/base/googleinit.h",
"src/base/mutex.h",
"src/glog/log_severity.h",
],
linkopts = [
#"-pthread",
#"-L/usr/local/lib -lunwind",
],
)
genrule(
name = "config_h",
srcs = [
"src/config.h.cmake.in",
],
outs = [
"config.h",
],
cmd = "awk '{ gsub(/^#cmakedefine/, \"//cmakedefine\"); print; }' $(<) > $(@)",
)
genrule(
name = "logging_h",
srcs = [
"src/glog/logging.h.in",
],
outs = [
"glog/logging.h",
],
cmd = "$(location :gen_sh) < $(<) > $(@)",
tools = [":gen_sh"],
)
genrule(
name = "raw_logging_h",
srcs = [
"src/glog/raw_logging.h.in",
],
outs = [
"glog/raw_logging.h",
],
cmd = "$(location :gen_sh) < $(<) > $(@)",
tools = [":gen_sh"],
)
genrule(
name = "stl_logging_h",
srcs = [
"src/glog/stl_logging.h.in",
],
outs = [
"glog/stl_logging.h",
],
cmd = "$(location :gen_sh) < $(<) > $(@)",
tools = [":gen_sh"],
)
genrule(
name = "vlog_is_on_h",
srcs = [
"src/glog/vlog_is_on.h.in",
],
outs = [
"glog/vlog_is_on.h",
],
cmd = "$(location :gen_sh) < $(<) > $(@)",
tools = [":gen_sh"],
)
genrule(
name = "gen_sh",
outs = [
"gen.sh",
],
cmd = """
cat > $@ <<"EOF"
#! /bin/sh
sed -e 's/@ac_cv_have_unistd_h@/1/g' \
-e 's/@ac_cv_have_stdint_h@/1/g' \
-e 's/@ac_cv_have_systypes_h@/1/g' \
-e 's/@ac_cv_have_libgflags_h@/1/g' \
-e 's/@ac_cv_have_uint16_t@/1/g' \
-e 's/@ac_cv_have___builtin_expect@/1/g' \
-e 's/@ac_cv_have_.*@/0/g' \
-e 's/@ac_google_start_namespace@/namespace google {/g' \
-e 's/@ac_google_end_namespace@/}/g' \
-e 's/@ac_google_namespace@/google/g' \
-e 's/@ac_cv___attribute___noinline@/__attribute__((noinline))/g' \
-e 's/@ac_cv___attribute___noreturn@/__attribute__((noreturn))/g' \
-e 's/@ac_cv___attribute___printf_4_5@/__attribute__((__format__ (__printf__, 4, 5)))/g'
EOF"""
)
third_party/gtest.BUILD
浏览文件 @
ac271096
cc_library(
cc_library(
name = "
main
",
name = "
gtest
",
srcs = glob(
srcs = glob(
["src/*.cc"],
["src/*.cc"],
exclude = ["src/gtest-all.cc"]
exclude = ["src/gtest-all.cc"]
...
...
third_party/protobuf_test/BUILD
浏览文件 @
ac271096
...
@@ -21,7 +21,7 @@ cc_test(
...
@@ -21,7 +21,7 @@ cc_test(
srcs
=
[
"example_lib_test.cc"
],
srcs
=
[
"example_lib_test.cc"
],
copts
=
[
"-Iexternal/gtest/include"
],
copts
=
[
"-Iexternal/gtest/include"
],
deps
=
[
deps
=
[
"@gtest//:
main
"
,
"@gtest//:
gtest
"
,
":example_lib"
,
":example_lib"
,
],
],
)
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录