Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
bcd77e14
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看板
提交
bcd77e14
编写于
10月 22, 2019
作者:
Z
zhouwei25
提交者:
liuwei1031
10月 22, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cmake_generotor support has been added to enable multi-version VS support (#20755)
上级
702aad5a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
39 addition
and
36 deletion
+39
-36
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+17
-15
cmake/external/xxhash.cmake
cmake/external/xxhash.cmake
+22
-21
未找到文件。
cmake/external/protobuf.cmake
浏览文件 @
bcd77e14
...
...
@@ -198,7 +198,9 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
SET
(
OPTIONAL_CACHE_ARGS
"-DZLIB_ROOT:STRING=
${
ZLIB_ROOT
}
"
)
ENDIF
()
IF
(
WIN32
)
SET
(
OPTIONAL_ARGS
${
OPTIONAL_ARGS
}
"-DCMAKE_GENERATOR_PLATFORM=x64"
)
SET
(
OPTIONAL_ARGS
${
OPTIONAL_ARGS
}
"-DCMAKE_GENERATOR=
${
CMAKE_GENERATOR
}
"
"-DCMAKE_GENERATOR_PLATFORM=
${
CMAKE_GENERATOR_PLATFORM
}
"
)
ENDIF
()
SET
(
PROTOBUF_REPO
"https://github.com/protocolbuffers/protobuf.git"
)
...
...
@@ -214,21 +216,21 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
GIT_TAG
${
PROTOBUF_TAG
}
CONFIGURE_COMMAND
${
CMAKE_COMMAND
}
${
PROTOBUF_SOURCES_DIR
}
/src/
${
TARGET_NAME
}
/cmake
${
OPTIONAL_ARGS
}
-Dprotobuf_BUILD_TESTS=OFF
-DCMAKE_SKIP_RPATH=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_INSTALL_PREFIX=
${
PROTOBUF_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=OFF
-Dprotobuf_MSVC_STATIC_RUNTIME=
${
MSVC_STATIC_CRT
}
${
OPTIONAL_ARGS
}
-Dprotobuf_BUILD_TESTS=OFF
-DCMAKE_SKIP_RPATH=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_INSTALL_PREFIX=
${
PROTOBUF_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR=lib
-DBUILD_SHARED_LIBS=OFF
-Dprotobuf_MSVC_STATIC_RUNTIME=
${
MSVC_STATIC_CRT
}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=
${
PROTOBUF_INSTALL_DIR
}
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
${
OPTIONAL_CACHE_ARGS
}
-DCMAKE_INSTALL_PREFIX:PATH=
${
PROTOBUF_INSTALL_DIR
}
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
${
OPTIONAL_CACHE_ARGS
}
)
ENDFUNCTION
()
...
...
cmake/external/xxhash.cmake
浏览文件 @
bcd77e14
...
...
@@ -16,26 +16,27 @@ ENDIF()
if
(
WIN32
)
ExternalProject_Add
(
extern_xxhash
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/Cyan4973/xxHash"
GIT_TAG
"v0.6.5"
PREFIX
${
XXHASH_SOURCE_DIR
}
DOWNLOAD_NAME
"xxhash"
UPDATE_COMMAND
""
BUILD_IN_SOURCE 1
PATCH_COMMAND
CONFIGURE_COMMAND
${
CMAKE_COMMAND
}
${
XXHASH_SOURCE_DIR
}
/src/extern_xxhash/cmake_unofficial
-DCMAKE_INSTALL_PREFIX:PATH=
${
XXHASH_INSTALL_DIR
}
-DCMAKE_BUILD_TYPE:STRING=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DBUILD_XXHSUM=OFF
-DCMAKE_GENERATOR_PLATFORM=x64
-DBUILD_SHARED_LIBS=OFF
${
OPTIONAL_CACHE_ARGS
}
TEST_COMMAND
""
extern_xxhash
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/Cyan4973/xxHash"
GIT_TAG
"v0.6.5"
PREFIX
${
XXHASH_SOURCE_DIR
}
DOWNLOAD_NAME
"xxhash"
UPDATE_COMMAND
""
BUILD_IN_SOURCE 1
PATCH_COMMAND
CONFIGURE_COMMAND
${
CMAKE_COMMAND
}
${
XXHASH_SOURCE_DIR
}
/src/extern_xxhash/cmake_unofficial
-DCMAKE_INSTALL_PREFIX:PATH=
${
XXHASH_INSTALL_DIR
}
-DCMAKE_BUILD_TYPE:STRING=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DBUILD_XXHSUM=OFF
-DCMAKE_GENERATOR=
${
CMAKE_GENERATOR
}
-DCMAKE_GENERATOR_PLATFORM=
${
CMAKE_GENERATOR_PLATFORM
}
-DBUILD_SHARED_LIBS=OFF
${
OPTIONAL_CACHE_ARGS
}
TEST_COMMAND
""
)
else
()
ExternalProject_Add
(
...
...
@@ -47,7 +48,7 @@ else()
DOWNLOAD_NAME
"xxhash"
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_IN_SOURCE 1
BUILD_IN_SOURCE
1
PATCH_COMMAND
BUILD_COMMAND
${
BUILD_CMD
}
INSTALL_COMMAND export PREFIX=
${
XXHASH_INSTALL_DIR
}
/ && make install
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录