Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
bfbc2263
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
未验证
提交
bfbc2263
编写于
6月 07, 2023
作者:
R
risemeup1
提交者:
GitHub
6月 07, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix_coverage_ci_bug (#54398)
* fix_bug * fix bug
上级
5bec661f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
16 deletion
+13
-16
cmake/external/snappy.cmake
cmake/external/snappy.cmake
+13
-16
未找到文件。
cmake/external/snappy.cmake
浏览文件 @
bfbc2263
...
@@ -11,36 +11,35 @@
...
@@ -11,36 +11,35 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
include
(
ExternalProject
)
include
(
ExternalProject
)
# NOTE: snappy is needed when linking with recordio
# NOTE: snappy is needed when linking with recordio
set
(
SNAPPY_TAG 1.1.7
)
set
(
SNAPPY_PREFIX_DIR
${
THIRD_PARTY_PATH
}
/snappy
)
set
(
SNAPPY_PREFIX_DIR
${
THIRD_PARTY_PATH
}
/snappy
)
set
(
SNAPPY_
SOURCE_DIR
${
PADDLE_SOURCE_DIR
}
/third_party
/snappy
)
set
(
SNAPPY_
INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install
/snappy
)
set
(
SNAPPY_INCLUDE_DIR
set
(
SNAPPY_INCLUDE_DIR
"
${
SNAPPY_
SOURCE
_DIR
}
/include"
"
${
SNAPPY_
INSTALL
_DIR
}
/include"
CACHE PATH
"snappy include directory."
FORCE
)
CACHE PATH
"snappy include directory."
FORCE
)
if
(
WIN32
)
if
(
WIN32
)
set
(
SNAPPY_CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4244 /wd4267"
)
set
(
SNAPPY_CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4244 /wd4267"
)
if
(
NOT EXISTS
"
${
SNAPPY_
SOURCE
_DIR
}
/lib/libsnappy.lib"
)
if
(
NOT EXISTS
"
${
SNAPPY_
INSTALL
_DIR
}
/lib/libsnappy.lib"
)
add_custom_command
(
add_custom_command
(
TARGET extern_snappy
TARGET extern_snappy
POST_BUILD
POST_BUILD
COMMAND cmake -E copy
${
SNAPPY_
SOURCE
_DIR
}
/lib/snappy.lib
COMMAND cmake -E copy
${
SNAPPY_
INSTALL
_DIR
}
/lib/snappy.lib
${
SNAPPY_
SOURCE
_DIR
}
/lib/libsnappy.lib
)
${
SNAPPY_
INSTALL
_DIR
}
/lib/libsnappy.lib
)
endif
()
endif
()
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_
SOURCE
_DIR
}
/lib/libsnappy.lib"
)
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_
INSTALL
_DIR
}
/lib/libsnappy.lib"
)
else
()
else
()
set
(
SNAPPY_CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
set
(
SNAPPY_CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_
SOURCE
_DIR
}
/lib/libsnappy.a"
)
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_
INSTALL
_DIR
}
/lib/libsnappy.a"
)
endif
()
endif
()
ExternalProject_Add
(
ExternalProject_Add
(
extern_snappy
extern_snappy
SOURCE_DIR
${
SNAPPY_SOURCE_DIR
}
GIT_REPOSITORY
"https://github.com/google/snappy"
GIT_TAG
"1.1.7"
PREFIX
${
SNAPPY_PREFIX_DIR
}
PREFIX
${
SNAPPY_PREFIX_DIR
}
UPDATE_COMMAND
""
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
...
@@ -51,22 +50,20 @@ ExternalProject_Add(
...
@@ -51,22 +50,20 @@ ExternalProject_Add(
-DCMAKE_CXX_FLAGS=
${
SNAPPY_CMAKE_CXX_FLAGS
}
-DCMAKE_CXX_FLAGS=
${
SNAPPY_CMAKE_CXX_FLAGS
}
-DCMAKE_CXX_FLAGS_RELEASE=
${
CMAKE_CXX_FLAGS_RELEASE
}
-DCMAKE_CXX_FLAGS_RELEASE=
${
CMAKE_CXX_FLAGS_RELEASE
}
-DCMAKE_CXX_FLAGS_DEBUG=
${
CMAKE_CXX_FLAGS_DEBUG
}
-DCMAKE_CXX_FLAGS_DEBUG=
${
CMAKE_CXX_FLAGS_DEBUG
}
-DCMAKE_INSTALL_PREFIX=
${
SNAPPY_
SOURCE
_DIR
}
-DCMAKE_INSTALL_PREFIX=
${
SNAPPY_
INSTALL
_DIR
}
-DCMAKE_INSTALL_LIBDIR=
${
SNAPPY_
SOURCE
_DIR
}
/lib
-DCMAKE_INSTALL_LIBDIR=
${
SNAPPY_
INSTALL
_DIR
}
/lib
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DBUILD_TESTING=OFF
-DBUILD_TESTING=OFF
-DSNAPPY_BUILD_TESTS:BOOL=OFF
-DSNAPPY_BUILD_TESTS:BOOL=OFF
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
${
EXTERNAL_OPTIONAL_ARGS
}
${
EXTERNAL_OPTIONAL_ARGS
}
CMAKE_CACHE_ARGS
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=
${
SNAPPY_
SOURCE
_DIR
}
-DCMAKE_INSTALL_PREFIX:PATH=
${
SNAPPY_
INSTALL
_DIR
}
-DCMAKE_INSTALL_LIBDIR:PATH=
${
SNAPPY_
SOURCE
_DIR
}
/lib
-DCMAKE_INSTALL_LIBDIR:PATH=
${
SNAPPY_
INSTALL
_DIR
}
/lib
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
BUILD_BYPRODUCTS
${
SNAPPY_LIBRARIES
}
)
BUILD_BYPRODUCTS
${
SNAPPY_LIBRARIES
}
)
add_library
(
snappy STATIC IMPORTED GLOBAL
)
add_library
(
snappy STATIC IMPORTED GLOBAL
)
set_property
(
TARGET snappy PROPERTY IMPORTED_LOCATION
${
SNAPPY_LIBRARIES
}
)
set_property
(
TARGET snappy PROPERTY IMPORTED_LOCATION
${
SNAPPY_LIBRARIES
}
)
include_directories
(
${
SNAPPY_INCLUDE_DIR
}
)
include_directories
(
${
SNAPPY_INCLUDE_DIR
}
)
add_dependencies
(
snappy extern_snappy
)
add_dependencies
(
snappy extern_snappy
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录