Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
46d4bd8a
MegEngine
项目概览
MegEngine 天元
/
MegEngine
大约 1 年 前同步成功
通知
399
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看板
提交
46d4bd8a
编写于
11月 11, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(windows): let sdk do not care about more macro on win
GitOrigin-RevId: c522c2fd632b8b908e1c5641fad43f231c597d3a
上级
c90e0b54
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
7 addition
and
25 deletion
+7
-25
imperative/CMakeLists.txt
imperative/CMakeLists.txt
+0
-1
lite/CMakeLists.txt
lite/CMakeLists.txt
+0
-6
lite/load_and_run/CMakeLists.txt
lite/load_and_run/CMakeLists.txt
+0
-4
src/CMakeLists.txt
src/CMakeLists.txt
+0
-4
src/megbrain_build_config.h.in
src/megbrain_build_config.h.in
+4
-10
test/CMakeLists.txt
test/CMakeLists.txt
+3
-0
未找到文件。
imperative/CMakeLists.txt
浏览文件 @
46d4bd8a
...
@@ -29,7 +29,6 @@ if (APPLE)
...
@@ -29,7 +29,6 @@ if (APPLE)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_shared
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_shared
)
elseif
(
MSVC OR WIN32
)
elseif
(
MSVC OR WIN32
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_shared
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_shared
)
target_compile_definitions
(
${
MODULE_NAME
}
PRIVATE MGE_DLL_IMPORT_DATA
)
message
(
STATUS
"CMAKE_MSVC_RUNTIME_LIBRARY:
${
CMAKE_MSVC_RUNTIME_LIBRARY
}
"
)
message
(
STATUS
"CMAKE_MSVC_RUNTIME_LIBRARY:
${
CMAKE_MSVC_RUNTIME_LIBRARY
}
"
)
set_target_properties
(
${
MODULE_NAME
}
PROPERTIES MSVC_RUNTIME_LIBRARY
"
${
CMAKE_MSVC_RUNTIME_LIBRARY
}
"
)
set_target_properties
(
${
MODULE_NAME
}
PROPERTIES MSVC_RUNTIME_LIBRARY
"
${
CMAKE_MSVC_RUNTIME_LIBRARY
}
"
)
else
()
else
()
...
...
lite/CMakeLists.txt
浏览文件 @
46d4bd8a
...
@@ -46,9 +46,6 @@ include_directories($<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/genfiles>)
...
@@ -46,9 +46,6 @@ include_directories($<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/genfiles>)
if
(
LITE_BUILD_WITH_MGE
)
if
(
LITE_BUILD_WITH_MGE
)
target_link_libraries
(
lite_static PRIVATE megbrain megdnn
${
MGE_CUDA_LIBS
}
)
target_link_libraries
(
lite_static PRIVATE megbrain megdnn
${
MGE_CUDA_LIBS
}
)
add_compile_definitions
(
LITE_BUILD_WITH_MGE=1
)
add_compile_definitions
(
LITE_BUILD_WITH_MGE=1
)
if
(
WIN32 OR MSVC
)
target_compile_definitions
(
lite_static PRIVATE MGE_DLL_IMPORT_DATA
)
endif
()
message
(
STATUS
"build lite with MegEngine."
)
message
(
STATUS
"build lite with MegEngine."
)
else
()
else
()
target_link_libraries
(
lite_static PUBLIC flatbuffers
)
target_link_libraries
(
lite_static PUBLIC flatbuffers
)
...
@@ -83,9 +80,6 @@ if(LITE_BUILD_WITH_MGE)
...
@@ -83,9 +80,6 @@ if(LITE_BUILD_WITH_MGE)
else
()
else
()
target_link_libraries
(
lite_shared_whl PRIVATE megengine_shared
)
target_link_libraries
(
lite_shared_whl PRIVATE megengine_shared
)
endif
()
endif
()
if
(
WIN32 OR MSVC
)
target_compile_definitions
(
lite_shared_whl PRIVATE MGE_DLL_IMPORT_DATA
)
endif
()
endif
()
endif
()
if
(
ANDROID
)
if
(
ANDROID
)
target_link_libraries
(
lite_shared_whl PRIVATE log
)
target_link_libraries
(
lite_shared_whl PRIVATE log
)
...
...
lite/load_and_run/CMakeLists.txt
浏览文件 @
46d4bd8a
...
@@ -33,10 +33,6 @@ if(BUILD_SHARED_LIBS)
...
@@ -33,10 +33,6 @@ if(BUILD_SHARED_LIBS)
target_link_libraries
(
load_and_run_depends_shared gflags
)
target_link_libraries
(
load_and_run_depends_shared gflags
)
target_link_libraries
(
load_and_run_depends_shared megengine
)
target_link_libraries
(
load_and_run_depends_shared megengine
)
if
(
WIN32 OR MSVC
)
target_compile_definitions
(
load_and_run_depends_shared PRIVATE MGE_DLL_IMPORT_DATA
)
endif
()
if
(
LITE_BUILD_WITH_RKNPU
)
if
(
LITE_BUILD_WITH_RKNPU
)
#rknn sdk1.0.0 depend on libc++_shared, use gold to remove NEEDED so symbol check
#rknn sdk1.0.0 depend on libc++_shared, use gold to remove NEEDED so symbol check
target_link_options
(
load_and_run_depends_shared PRIVATE
"-fuse-ld=gold"
)
target_link_options
(
load_and_run_depends_shared PRIVATE
"-fuse-ld=gold"
)
...
...
src/CMakeLists.txt
浏览文件 @
46d4bd8a
...
@@ -224,10 +224,6 @@ if(WIN32 OR MSVC)
...
@@ -224,10 +224,6 @@ if(WIN32 OR MSVC)
target_compile_definitions
(
megdnn PRIVATE MGE_DLL_EXPORT
)
target_compile_definitions
(
megdnn PRIVATE MGE_DLL_EXPORT
)
target_compile_definitions
(
megengine PRIVATE MGE_DLL_EXPORT
)
target_compile_definitions
(
megengine PRIVATE MGE_DLL_EXPORT
)
target_compile_definitions
(
megengine_shared PRIVATE MGE_DLL_EXPORT
)
target_compile_definitions
(
megengine_shared PRIVATE MGE_DLL_EXPORT
)
target_compile_definitions
(
megbrain PRIVATE MGE_DLL_EXPORT_DATA
)
target_compile_definitions
(
megdnn PRIVATE MGE_DLL_EXPORT_DATA
)
target_compile_definitions
(
megengine PRIVATE MGE_DLL_EXPORT_DATA
)
target_compile_definitions
(
megengine_shared PRIVATE MGE_DLL_EXPORT_DATA
)
# please do not use WINDOWS_EXPORT_ALL_SYMBOLS, as symbols max than 65535 when build with CUDA
# please do not use WINDOWS_EXPORT_ALL_SYMBOLS, as symbols max than 65535 when build with CUDA
#set_target_properties(megengine PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
#set_target_properties(megengine PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
#set_target_properties(megengine_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
#set_target_properties(megengine_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
...
...
src/megbrain_build_config.h.in
浏览文件 @
46d4bd8a
...
@@ -253,22 +253,16 @@
...
@@ -253,22 +253,16 @@
#ifdef WIN32
#ifdef WIN32
#ifdef MGE_DLL_EXPORT
#ifdef MGE_DLL_EXPORT
#define MGE_WIN_DECLSPEC_FUC __declspec(dllexport)
#define MGE_WIN_DECLSPEC_FUC __declspec(dllexport)
#else
#define MGE_WIN_DECLSPEC_DATA __declspec(dllexport)
#elif defined(MGE_WINDOWS_STATIC_LINK)
#define MGE_WIN_DECLSPEC_FUC
#define MGE_WIN_DECLSPEC_FUC
#
endif
#
define MGE_WIN_DECLSPEC_DATA
#else
#else
#define MGE_WIN_DECLSPEC_FUC
#define MGE_WIN_DECLSPEC_FUC
#endif
#ifdef WIN32
#if defined(MGE_DLL_EXPORT_DATA)
#define MGE_WIN_DECLSPEC_DATA __declspec(dllexport)
#elif defined(MGE_DLL_IMPORT_DATA)
#define MGE_WIN_DECLSPEC_DATA __declspec(dllimport)
#define MGE_WIN_DECLSPEC_DATA __declspec(dllimport)
#else
#define MGE_WIN_DECLSPEC_DATA
#endif
#endif
#else
#else
#define MGE_WIN_DECLSPEC_FUC
#define MGE_WIN_DECLSPEC_DATA
#define MGE_WIN_DECLSPEC_DATA
#endif
#endif
...
...
test/CMakeLists.txt
浏览文件 @
46d4bd8a
...
@@ -16,6 +16,9 @@ if (MGE_WITH_CUDA AND MGE_WITH_TRT)
...
@@ -16,6 +16,9 @@ if (MGE_WITH_CUDA AND MGE_WITH_TRT)
endif
()
endif
()
add_executable
(
megbrain_test
${
SOURCES
}
)
add_executable
(
megbrain_test
${
SOURCES
}
)
if
(
WIN32 OR MSVC
)
target_compile_definitions
(
megbrain_test PRIVATE MGE_WINDOWS_STATIC_LINK
)
endif
()
target_link_libraries
(
megbrain_test gtest gmock
)
target_link_libraries
(
megbrain_test gtest gmock
)
target_link_libraries
(
megbrain_test megbrain megdnn
${
MGE_CUDA_LIBS
}
)
target_link_libraries
(
megbrain_test megbrain megdnn
${
MGE_CUDA_LIBS
}
)
if
(
MGE_WITH_CUDA
)
if
(
MGE_WITH_CUDA
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录