Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
ff431e72
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
403
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看板
提交
ff431e72
编写于
9月 23, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(cmake/windows): use full install path on Windows build
GitOrigin-RevId: 41b331450b2c474674c5eda428afadc041968d13
上级
dc28a434
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
11 deletion
+12
-11
scripts/cmake-build/host_build.sh
scripts/cmake-build/host_build.sh
+12
-3
scripts/cmake-build/utils/utils.sh
scripts/cmake-build/utils/utils.sh
+0
-8
未找到文件。
scripts/cmake-build/host_build.sh
浏览文件 @
ff431e72
...
...
@@ -267,13 +267,22 @@ function cmake_build_windows() {
BUILD_DIR
=
$SRC_DIR
/build_dir/host/build
# 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
# as a solution, we map INSTALL_DIR to INSTALL_DIR_WIN (/c --> C:)
INSTALL_DIR
=
${
BUILD_DIR
}
/../install
INSTALL_DIR_PREFIX
=
${
INSTALL_DIR
:0:2
}
if
[
${
INSTALL_DIR_PREFIX
}
=
"/c"
]
;
then
echo
"INSTALL_DIR_PREFIX is
${
INSTALL_DIR_PREFIX
}
, map to C:"
INSTALL_DIR_WIN
=
"C:
${
INSTALL_DIR
:2
}
"
else
INSTALL_DIR_WIN
=
${
INSTALL_DIR
}
fi
MGE_WITH_CUDA
=
$1
MGE_INFERENCE_ONLY
=
$2
BUILD_TYPE
=
$3
echo
"build dir:
$BUILD_DIR
"
echo
"install dir:
$INSTALL_DIR
"
echo
"install dir for ninja:
$INSTALL_DIR_WIN
"
echo
"build type:
$BUILD_TYPE
"
echo
"MGE_WITH_CUDA:
$MGE_WITH_CUDA
"
echo
"MGE_INFERENCE_ONLY:
$MGE_INFERENCE_ONLY
"
...
...
@@ -291,7 +300,7 @@ function cmake_build_windows() {
-DMGE_INFERENCE_ONLY=
$MGE_INFERENCE_ONLY
\
-DMGE_WITH_CUDA=
$MGE_WITH_CUDA
\
-DCMAKE_BUILD_TYPE=
$BUILD_TYPE
\
-DCMAKE_INSTALL_PREFIX:PATH=
$INSTALL_DIR
\
-DCMAKE_INSTALL_PREFIX:PATH=
$INSTALL_DIR
_WIN
\
-DCMAKE_C_COMPILER=clang-cl.exe
\
-DCMAKE_CXX_COMPILER=clang-cl.exe
\
-DCMAKE_MAKE_PROGRAM=ninja.exe
\
...
...
scripts/cmake-build/utils/utils.sh
浏览文件 @
ff431e72
...
...
@@ -64,14 +64,6 @@ function try_remove_old_build() {
if
[
$REMOVE_OLD_BUILD
=
"true"
]
;
then
echo
"remove old build/install 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"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录