From 28d48f2f7ae0ed680990b4ddff1b8da273e256cc Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Fri, 11 Feb 2022 12:41:13 +0800 Subject: [PATCH] fix(mgb/src): fix megbrain cmake unsupport android_nn GitOrigin-RevId: 037c197912feedafc9eb9c48eaf53fdcb4e9f514 --- CMakeLists.txt | 6 +----- src/CMakeLists.txt | 1 - src/megbrain_build_config.h.in | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22dbeaa3e..fe1f2876d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,7 @@ option(MGE_WITH_ROCM "Enable ROCM support" OFF) option(MGE_WITH_LARGE_ARCHIVE "Enable big archive link support" OFF) option(MGE_BUILD_WITH_ASAN "Enable build with ASAN, need compiler support" OFF) option(MGE_WITH_CUSTOM_OP "Build with Custom op" OFF) + if(MSVC OR WIN32) # FIXME: static link Windows vc runtime with some version from Visual Studio have some # runtime issue at some call PATH, for example: _imperative_rt.pyd --> @@ -1088,11 +1089,6 @@ set(MEGDNN_WITH_ROCM ${MGE_WITH_ROCM}) # CAMBRICON set(MGB_CAMBRICON ${MGE_WITH_CAMBRICON}) - -# ENFLAME -set(MGB_ENFLAME ${MGE_WITH_ENFLAME}) -set(MEGDNN_WITH_ENFLAME ${MGE_WITH_ENFLAME}) - # Debug info if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 807f44f16..313118b9e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,6 @@ if(MGE_WITH_CUDA AND MGE_WITH_TRT) file(GLOB_RECURSE SOURCES_ tensorrt/impl/*.cpp tensorrt/impl/*.inl) list(APPEND SOURCES ${SOURCES_}) endif() - if(MGE_WITH_CAMBRICON) list(APPEND MGB_INC ${CMAKE_CURRENT_LIST_DIR}/cambricon/include) file(GLOB_RECURSE SOURCES_ cambricon/impl/*.cpp cambricon/impl/*.inl) diff --git a/src/megbrain_build_config.h.in b/src/megbrain_build_config.h.in index d0e31de29..17eb8bc68 100644 --- a/src/megbrain_build_config.h.in +++ b/src/megbrain_build_config.h.in @@ -252,7 +252,7 @@ #ifdef WIN32 #ifdef MGE_DLL_EXPORT -#define MGE_WIN_DECLSPEC_FUC __declspec(dllexport) +#define MGE_WIN_DECLSPEC_FUC __declspec(dllexport) #define MGE_WIN_DECLSPEC_DATA __declspec(dllexport) #elif defined(MGE_WINDOWS_STATIC_LINK) #define MGE_WIN_DECLSPEC_FUC -- GitLab