diff --git a/mindspore-lite/src/common/ops/CMakeLists.txt b/mindspore-lite/src/common/ops/CMakeLists.txt index a6cfa820270b9351c5cc21298a6c4711685384a3..39baf63314cc52d8fcfdf11002ad2a02a18b1ee9 100644 --- a/mindspore-lite/src/common/ops/CMakeLists.txt +++ b/mindspore-lite/src/common/ops/CMakeLists.txt @@ -43,6 +43,10 @@ if(MSLITE_ENABLE_CLOUD_FUSION_INFERENCE OR MSLITE_ENABLE_CLOUD_INFERENCE) ) endif() +set_property(SOURCE ${OPS_SRC} PROPERTY COMPILE_DEFINITIONS + LOG_HDR_FILE_REL_PATH="mindspore-lite/../mindspore/mindspore/core/include/utils/log_adapter.h" + SUBMODULE_ID=mindspore::SubModuleId::SM_LITE) + add_library(cpu_ops_mid OBJECT ${OPS_SRC}) add_dependencies(cpu_ops_mid fbs_src fbs_inner_src) diff --git a/mindspore-lite/src/extendrt/cxx_api/CMakeLists.txt b/mindspore-lite/src/extendrt/cxx_api/CMakeLists.txt index ccd89ad35f5eeef0cc64f2cf6aa846f66827f59d..4789231f7d6fbbbd34ea41b5d9a7c77f50e08ded 100644 --- a/mindspore-lite/src/extendrt/cxx_api/CMakeLists.txt +++ b/mindspore-lite/src/extendrt/cxx_api/CMakeLists.txt @@ -57,5 +57,9 @@ set(MSLIB_INFER_SRC ${API_ACL_SRC} ${API_OPS_SRC} ) +set_property(SOURCE ${MSLIB_INFER_SRC} PROPERTY COMPILE_DEFINITIONS + LOG_HDR_FILE_REL_PATH="mindspore-lite/../mindspore/mindspore/core/include/utils/log_adapter.h" + SUBMODULE_ID=mindspore::SubModuleId::SM_LITE) + add_library(mindspore_infer_shared_lib_obj OBJECT ${MSLIB_INFER_SRC}) add_dependencies(mindspore_infer_shared_lib_obj fbs_inner_src)