Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
16f8508d
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
16f8508d
编写于
6月 23, 2017
作者:
L
Liu Yiqun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use CMake system variables, such as CMAKE_STATIC_LIBRARY_PREFIX/SUFFIX, instead.
上级
c89fe83a
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
25 deletion
+8
-25
cmake/external/openblas.cmake
cmake/external/openblas.cmake
+2
-1
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+6
-6
cmake/system.cmake
cmake/system.cmake
+0
-18
未找到文件。
cmake/external/openblas.cmake
浏览文件 @
16f8508d
...
...
@@ -21,7 +21,8 @@ IF(NOT ${CBLAS_FOUND})
SET
(
CBLAS_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/openblas
)
SET
(
CBLAS_INC_DIR
"
${
CBLAS_INSTALL_DIR
}
/include"
CACHE PATH
"openblas include directory."
FORCE
)
SET
(
CBLAS_LIBRARIES
"
${
CBLAS_INSTALL_DIR
}
/lib/
${
LIBRARY_PREFIX
}
openblas
${
STATIC_LIBRARY_SUFFIX
}
"
SET
(
CBLAS_LIBRARIES
"
${
CBLAS_INSTALL_DIR
}
/lib/
${
CMAKE_STATIC_LIBRARY_PREFIX
}
openblas
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
"
CACHE FILEPATH
"openblas library."
FORCE
)
SET
(
COMMON_ARGS CC=
${
CMAKE_C_COMPILER
}
NO_SHARED=1 NO_LAPACK=1 libs
)
...
...
cmake/external/protobuf.cmake
浏览文件 @
16f8508d
...
...
@@ -25,9 +25,9 @@ macro(PROMPT_PROTOBUF_LIB)
INCLUDE_DIRECTORIES
(
${
PROTOBUF_INCLUDE_DIR
}
)
# Assuming that all the protobuf libraries are of the same type.
IF
(
${
PROTOBUF_LIBRARY
}
MATCHES
"
${
STATIC_LIBRARY_SUFFIX
}
$"
)
IF
(
${
PROTOBUF_LIBRARY
}
MATCHES
"
${
CMAKE_
STATIC_LIBRARY_SUFFIX
}
$"
)
SET
(
protobuf_LIBTYPE STATIC
)
ELSEIF
(
${
PROTOBUF_LIBRARY
}
MATCHES
"
${
DYNAMIC
_LIBRARY_SUFFIX
}
$"
)
ELSEIF
(
${
PROTOBUF_LIBRARY
}
MATCHES
"
${
CMAKE_SHARED
_LIBRARY_SUFFIX
}
$"
)
SET
(
protobuf_LIBTYPE SHARED
)
ELSE
()
MESSAGE
(
FATAL_ERROR
"Unknown library type:
${
PROTOBUF_LIBRARY
}
"
)
...
...
@@ -80,16 +80,16 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
SET
(
${
TARGET_NAME
}
_INCLUDE_DIR
"
${
PROTOBUF_INSTALL_DIR
}
/include"
PARENT_SCOPE
)
SET
(
PROTOBUF_INCLUDE_DIR
"
${
PROTOBUF_INSTALL_DIR
}
/include"
PARENT_SCOPE
)
SET
(
${
TARGET_NAME
}
_LITE_LIBRARY
"
${
PROTOBUF_INSTALL_DIR
}
/lib/libprotobuf-lite
${
STATIC_LIBRARY_SUFFIX
}
"
"
${
PROTOBUF_INSTALL_DIR
}
/lib/libprotobuf-lite
${
CMAKE_
STATIC_LIBRARY_SUFFIX
}
"
PARENT_SCOPE
)
SET
(
${
TARGET_NAME
}
_LIBRARY
"
${
PROTOBUF_INSTALL_DIR
}
/lib/libprotobuf
${
STATIC_LIBRARY_SUFFIX
}
"
"
${
PROTOBUF_INSTALL_DIR
}
/lib/libprotobuf
${
CMAKE_
STATIC_LIBRARY_SUFFIX
}
"
PARENT_SCOPE
)
SET
(
${
TARGET_NAME
}
_PROTOC_LIBRARY
"
${
PROTOBUF_INSTALL_DIR
}
/lib/libprotoc
${
STATIC_LIBRARY_SUFFIX
}
"
"
${
PROTOBUF_INSTALL_DIR
}
/lib/libprotoc
${
CMAKE_
STATIC_LIBRARY_SUFFIX
}
"
PARENT_SCOPE
)
SET
(
${
TARGET_NAME
}
_PROTOC_EXECUTABLE
"
${
PROTOBUF_INSTALL_DIR
}
/bin/protoc
${
EXECUTABLE_SUFFIX
}
"
"
${
PROTOBUF_INSTALL_DIR
}
/bin/protoc
${
CMAKE_
EXECUTABLE_SUFFIX
}
"
PARENT_SCOPE
)
SET
(
OPTIONAL_CACHE_ARGS
""
)
...
...
cmake/system.cmake
浏览文件 @
16f8508d
...
...
@@ -84,24 +84,6 @@ IF(DEFINED CMAKE_SYSTEM_NAME)
ENDIF
()
ENDIF
()
# prefix and suffix on different os
IF
(
WIN32
)
SET
(
LIBRARY_PREFIX
""
)
SET
(
SHARED_LIBRARY_SUFFIX
".dll"
)
SET
(
STATIC_LIBRARY_SUFFIX
".lib"
)
SET
(
EXECUTABLE_SUFFIX
".exe"
)
ELSE
(
WIN32
)
SET
(
LIBRARY_PREFIX
"lib"
)
IF
(
APPLE
)
SET
(
SHARED_LIBRARY_SUFFIX
".dylib"
)
ELSE
(
APPLE
)
SET
(
SHARED_LIBRARY_SUFFIX
".so"
)
ENDIF
(
APPLE
)
SET
(
STATIC_LIBRARY_SUFFIX
".a"
)
SET
(
EXECUTABLE_SUFFIX
""
)
ENDIF
(
WIN32
)
# external dependencies log output
SET
(
EXTERNAL_PROJECT_LOG_ARGS
LOG_DOWNLOAD 0
# Wrap download in script to log output
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录