Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
343687c3
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
343687c3
编写于
6月 02, 2020
作者:
Z
Zhou Wei
提交者:
GitHub
6月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CHERRY-PICK 1.8]fix windows bug that compile .cu files use MSVC dynamic C runtime (#24826)
* cherry-pick #24729
上级
ab065563
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
5 deletion
+10
-5
cmake/cuda.cmake
cmake/cuda.cmake
+8
-3
cmake/flags.cmake
cmake/flags.cmake
+2
-2
未找到文件。
cmake/cuda.cmake
浏览文件 @
343687c3
...
@@ -202,9 +202,9 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
...
@@ -202,9 +202,9 @@ set(CUDA_PROPAGATE_HOST_FLAGS OFF)
# Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc.
# Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc.
# So, don't set these flags here.
# So, don't set these flags here.
if
(
NOT WIN32
)
# windows msvc2015 support c++11 natively.
if
(
NOT WIN32
)
# windows msvc2015 support c++11 natively.
# -std=c++11 -fPIC not recoginize by msvc, -Xcompiler will be added by cmake.
# -std=c++11 -fPIC not recoginize by msvc, -Xcompiler will be added by cmake.
list
(
APPEND CUDA_NVCC_FLAGS
"-std=c++11"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-std=c++11"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-Xcompiler -fPIC"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-Xcompiler -fPIC"
)
endif
(
NOT WIN32
)
endif
(
NOT WIN32
)
# in cuda9, suppress cuda warning on eigen
# in cuda9, suppress cuda warning on eigen
...
@@ -226,6 +226,11 @@ if (NOT WIN32)
...
@@ -226,6 +226,11 @@ if (NOT WIN32)
else
(
NOT WIN32
)
else
(
NOT WIN32
)
list
(
APPEND CUDA_NVCC_FLAGS
"-Xcompiler
\"
/wd 4244 /wd 4267 /wd 4819
\"
"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-Xcompiler
\"
/wd 4244 /wd 4267 /wd 4819
\"
"
)
list
(
APPEND CUDA_NVCC_FLAGS
"--compiler-options;/bigobj"
)
list
(
APPEND CUDA_NVCC_FLAGS
"--compiler-options;/bigobj"
)
if
(
MSVC_STATIC_CRT
)
list
(
APPEND CUDA_NVCC_FLAGS
"-Xcompiler"
"-MT$<$<CONFIG:Debug>:d>"
)
else
()
list
(
APPEND CUDA_NVCC_FLAGS
"-Xcompiler"
"-MD$<$<CONFIG:Debug>:d>"
)
endif
()
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-g -G"
)
list
(
APPEND CUDA_NVCC_FLAGS
"-g -G"
)
# match the cl's _ITERATOR_DEBUG_LEVEL
# match the cl's _ITERATOR_DEBUG_LEVEL
...
...
cmake/flags.cmake
浏览文件 @
343687c3
...
@@ -217,8 +217,8 @@ foreach(flag ${GPU_COMMON_FLAGS})
...
@@ -217,8 +217,8 @@ foreach(flag ${GPU_COMMON_FLAGS})
endforeach
()
endforeach
()
if
(
WIN32 AND MSVC_STATIC_CRT
)
if
(
WIN32 AND MSVC_STATIC_CRT
)
# windows build turn off warnings.
# windows build turn off warnings.
safe_set_static_flag
()
safe_set_static_flag
()
foreach
(
flag_var
foreach
(
flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录