Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
af80d365
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
404
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
af80d365
编写于
9月 14, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(cmake/windows): fix cmake install failed on Windows
GitOrigin-RevId: 2c6ba34dbd92c2def2b20a84f9f247db68852aa9
上级
8e4c3c53
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
5 deletion
+15
-5
scripts/cmake-build/host_build.sh
scripts/cmake-build/host_build.sh
+6
-4
scripts/cmake-build/utils/utils.sh
scripts/cmake-build/utils/utils.sh
+9
-1
未找到文件。
scripts/cmake-build/host_build.sh
浏览文件 @
af80d365
...
...
@@ -33,8 +33,8 @@ BUILD_DEVELOP=ON
NINJA_DRY_RUN
=
OFF
SPECIFIED_TARGET
=
"install/strip"
if
[[
$OS
=
~
"NT"
]]
;
then
echo
"Windows
do not support strip/install by defaut
"
SPECIFIED_TARGET
=
""
echo
"Windows
no need strip, caused by pdb file always split with exe
"
SPECIFIED_TARGET
=
"
install
"
fi
echo
"EXTRA_CMAKE_ARGS:
${
EXTRA_CMAKE_ARGS
}
"
...
...
@@ -248,7 +248,10 @@ function cmake_build_windows() {
# windows do not support long path, so we cache the BUILD_DIR ASAP
prepare_env_for_windows_build
BUILD_DIR
=
$SRC_DIR
/build_dir/host/build
INSTALL_DIR
=
$BUILD_DIR
/../install
# ninja have compat issue with bash env, which fork from windows-git
# which will map C: to /c/c/ dir, which will lead to install file to /c/c/..
# as a solution, we use relative path to INSTALL_DIR
INSTALL_DIR
=
../install
MGE_WITH_CUDA
=
$1
MGE_INFERENCE_ONLY
=
$2
BUILD_TYPE
=
$3
...
...
@@ -261,7 +264,6 @@ function cmake_build_windows() {
echo
"create build dir"
mkdir
-p
$BUILD_DIR
mkdir
-p
$INSTALL_DIR
cd_real_build_dir
$BUILD_DIR
echo
"now try build windows native with cmake/clang-ci/Ninja/Visual Studio ....."
export
CFLAGS
=
-
$MGE_WINDOWS_BUILD_MARCH
...
...
scripts/cmake-build/utils/utils.sh
浏览文件 @
af80d365
...
...
@@ -61,8 +61,16 @@ function try_remove_old_build() {
if
[
$REMOVE_OLD_BUILD
=
"true"
]
;
then
echo
"remove old build/install dir"
rm
-rf
${
BUILD_DIR
}
rm
-rf
${
INSTALL_DIR
}
# compat install is relative path for BUILD_DIR
if
[
-d
${
BUILD_DIR
}
]
;
then
cd
${
BUILD_DIR
}
rm
-rf
${
INSTALL_DIR
}
cd
-
fi
rm
-rf
${
BUILD_DIR
}
else
echo
"strip remove old build"
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录