提交 66493a89 编写于 作者: H hangq

fix bug for securec

上级 3e5eb8ea
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <memory> #include <memory>
#include <functional> #include <functional>
#include "utils/overload.h" #include "utils/overload.h"
#include "./securec.h"
#ifndef USE_ANDROID_LOG #ifndef USE_ANDROID_LOG
#ifdef USE_GLOG #ifdef USE_GLOG
#include "glog/logging.h" #include "glog/logging.h"
......
...@@ -16,6 +16,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ...@@ -16,6 +16,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${TOP_DIR}/third_party) include_directories(${TOP_DIR}/third_party)
include_directories(${TOP_DIR}/third_party/flatbuffers/include) include_directories(${TOP_DIR}/third_party/flatbuffers/include)
include(${TOP_DIR}/cmake/utils.cmake)
include(${TOP_DIR}/cmake/dependency_utils.cmake)
include(${TOP_DIR}/cmake/dependency_securec.cmake)
option(CMAKE_BUILD_TYPE "build type" Release) option(CMAKE_BUILD_TYPE "build type" Release)
option(BUILD_DEVICE "if build device" on) option(BUILD_DEVICE "if build device" on)
option(SUPPORT_TRAIN "if build for on-device train" off) option(SUPPORT_TRAIN "if build for on-device train" off)
...@@ -91,10 +95,10 @@ if (BUILD_CONVERTER) ...@@ -91,10 +95,10 @@ if (BUILD_CONVERTER)
set(PYTHON_LIBRARIES "${py_lib}") set(PYTHON_LIBRARIES "${py_lib}")
endif() endif()
include_directories(${PYTHON_INCLUDE_DIRS}) include_directories(${PYTHON_INCLUDE_DIRS})
include(${TOP_DIR}/cmake/utils.cmake) # include(${TOP_DIR}/cmake/utils.cmake)
include(${TOP_DIR}/cmake/dependency_utils.cmake) # include(${TOP_DIR}/cmake/dependency_utils.cmake)
include(${TOP_DIR}/cmake/external_libs/json.cmake) include(${TOP_DIR}/cmake/external_libs/json.cmake)
include(${TOP_DIR}/cmake/dependency_securec.cmake) # include(${TOP_DIR}/cmake/dependency_securec.cmake)
include(${TOP_DIR}/cmake/external_libs/pybind11.cmake) include(${TOP_DIR}/cmake/external_libs/pybind11.cmake)
include(${TOP_DIR}/cmake/external_libs/eigen.cmake) include(${TOP_DIR}/cmake/external_libs/eigen.cmake)
include_directories(${TOP_DIR}/third_party/protobuf/build/include) include_directories(${TOP_DIR}/third_party/protobuf/build/include)
......
...@@ -75,6 +75,7 @@ add_library(mindspore-lite SHARED ${LITE_SRC} ${ANF_SRC}) ...@@ -75,6 +75,7 @@ add_library(mindspore-lite SHARED ${LITE_SRC} ${ANF_SRC})
target_link_libraries(mindspore-lite target_link_libraries(mindspore-lite
cpu_kernel_mid_ cpu_kernel_mid_
ops_mid_ ops_mid_
${SECUREC_LIBRARY}
) )
add_subdirectory(runtime/kernel/arm) add_subdirectory(runtime/kernel/arm)
......
...@@ -11,7 +11,7 @@ add_executable(benchmark ...@@ -11,7 +11,7 @@ add_executable(benchmark
${COMMON_SRC}) ${COMMON_SRC})
if (PLATFORM_ARM32 OR PLATFORM_ARM64) if (PLATFORM_ARM32 OR PLATFORM_ARM64)
target_link_libraries(benchmark mindspore-lite) target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY})
else() else()
target_link_libraries(benchmark mindspore-lite pthread) target_link_libraries(benchmark mindspore-lite ${SECUREC_LIBRARY} pthread)
endif() endif()
...@@ -54,13 +54,13 @@ FusionPattern &FusionPattern::AddPatternOp(const std::string &id, const std::vec ...@@ -54,13 +54,13 @@ FusionPattern &FusionPattern::AddPatternOp(const std::string &id, const std::vec
if (op == nullptr) { if (op == nullptr) {
// MS_LOG(ERROR) << "new an object failed"); // MS_LOG(ERROR) << "new an object failed");
hasError = true; hasError = true;
} else {
op->id = id;
op->types = types;
ops.push_back(op);
opMap[id] = op;
} }
op->id = id;
op->types = types;
ops.push_back(op);
opMap[id] = op;
return *this; return *this;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册