Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
564c6abd
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看板
提交
564c6abd
编写于
1月 20, 2018
作者:
D
dangqingqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add cmake for extern project of boost.
上级
8e08b0a2
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
75 addition
and
1 deletion
+75
-1
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/external/boost.cmake
cmake/external/boost.cmake
+73
-0
paddle/framework/CMakeLists.txt
paddle/framework/CMakeLists.txt
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
564c6abd
...
@@ -134,6 +134,7 @@ include(external/openblas) # download, build, install openblas
...
@@ -134,6 +134,7 @@ include(external/openblas) # download, build, install openblas
include
(
external/mkldnn
)
# download, build, install mkldnn
include
(
external/mkldnn
)
# download, build, install mkldnn
include
(
external/swig
)
# download, build, install swig
include
(
external/swig
)
# download, build, install swig
include
(
external/warpctc
)
# download, build, install warpctc
include
(
external/warpctc
)
# download, build, install warpctc
include
(
external/boost
)
# download, build, install boost
include
(
external/any
)
# download libn::any
include
(
external/any
)
# download libn::any
include
(
external/eigen
)
# download eigen3
include
(
external/eigen
)
# download eigen3
include
(
external/pybind11
)
# download pybind11
include
(
external/pybind11
)
# download pybind11
...
...
cmake/external/boost.cmake
0 → 100644
浏览文件 @
564c6abd
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
INCLUDE
(
ExternalProject
)
set
(
BOOST_PROJECT
"extern_boost"
)
set
(
BOOST_VER
"1.66.0"
)
set
(
BOOST_TAR
"boost_1_66_0"
)
set
(
BOOST_URL
"https://dl.bintray.com/boostorg/release/
${
BOOST_VER
}
/source/
${
BOOST_TAR
}
.tar.gz"
)
set
(
BOOST_SOURCES_DIR
${
THIRD_PARTY_PATH
}
/boost
)
set
(
BOOST_DOWNLOAD_DIR
"
${
BOOST_SOURCES_DIR
}
/src/
${
BOOST_PROJECT
}
"
)
set
(
BOOST_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/boost
)
set
(
BOOST_ROOT
${
BOOST_INSTALL_DIR
}
CACHE FILEPATH
"boost root directory."
FORCE
)
set
(
BOOST_INCLUDE_DIR
"
${
BOOST_INSTALL_DIR
}
/include"
CACHE PATH
"boost include directory."
FORCE
)
set
(
BOOST_BOOTSTRAP_CMD
)
set
(
BOOST_B2_CMD
)
if
(
UNIX
)
set
(
BOOST_BOOTSTRAP_CMD ./bootstrap.sh
)
set
(
BOOST_B2_CMD ./b2
)
else
()
if
(
WIN32
)
set
(
BOOST_BOOTSTRAP_CMD bootstrap.bat
)
set
(
BOOST_B2_CMD b2.exe
)
endif
()
endif
()
INCLUDE_DIRECTORIES
(
${
BOOST_INCLUDE_DIR
}
)
ExternalProject_Add
(
${
BOOST_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
DOWNLOAD_DIR
${
BOOST_DOWNLOAD_DIR
}
DOWNLOAD_COMMAND wget --no-check-certificate
${
BOOST_URL
}
-c -q -O
${
BOOST_TAR
}
.tar.gz
&& tar zxf
${
BOOST_TAR
}
.tar.gz
DOWNLOAD_NO_PROGRESS 1
PREFIX
${
BOOST_SOURCES_DIR
}
CONFIGURE_COMMAND sh -c
"cd <SOURCE_DIR>/
${
BOOST_TAR
}
&&
${
BOOST_BOOTSTRAP_CMD
}
--prefix=
${
BOOST_INSTALL_DIR
}
"
BUILD_COMMAND cd <SOURCE_DIR>/
${
BOOST_TAR
}
&&
${
BOOST_B2_CMD
}
install --prefix=
${
BOOST_INSTALL_DIR
}
--with-program_options
INSTALL_COMMAND
""
UPDATE_COMMAND
""
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.3.0"
)
set
(
dummyfile
${
CMAKE_CURRENT_BINARY_DIR
}
/boost_dummy.c
)
file
(
WRITE
${
dummyfile
}
"const char *dummy =
\"
${
dummyfile
}
\"
;"
)
add_library
(
boost STATIC
${
dummyfile
}
)
else
()
add_library
(
boost INTERFACE
)
endif
()
ADD_DEPENDENCIES
(
boost
${
BOOST_PROJECT
}
)
LIST
(
APPEND external_project_dependencies boost
)
if
(
WIN32
)
set
(
Boost_INCLUDE_DIR
${
BOOST_INSTALL_DIR
}
/include/boost
)
set
(
BOOST_ROOT
${
BOOST_INSTALL_DIR
}
)
else
()
set
(
Boost_INCLUDE_DIR
${
BOOST_INSTALL_DIR
}
/include
)
endif
()
set
(
Boost_LIBRARY_DIR
${
BOOST_INSTALL_DIR
}
/lib
)
paddle/framework/CMakeLists.txt
浏览文件 @
564c6abd
# ddim lib
# ddim lib
proto_library
(
framework_proto SRCS framework.proto
)
proto_library
(
framework_proto SRCS framework.proto
)
cc_library
(
ddim SRCS ddim.cc DEPS eigen3
)
cc_library
(
ddim SRCS ddim.cc DEPS eigen3
boost
)
cc_test
(
ddim_test SRCS ddim_test.cc DEPS ddim
)
cc_test
(
ddim_test SRCS ddim_test.cc DEPS ddim
)
nv_test
(
dim_test SRCS dim_test.cu DEPS ddim
)
nv_test
(
dim_test SRCS dim_test.cu DEPS ddim
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录