|
|
|
@@ -22,6 +22,14 @@ file(GLOB_RECURSE CORE_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} |
|
|
|
"utils/*.cc" |
|
|
|
"load_mindir/*.cc" |
|
|
|
) |
|
|
|
|
|
|
|
file(GLOB_RECURSE PROTO_FILE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "proto/*.proto") |
|
|
|
if(NOT(COMPILE_LITE)) |
|
|
|
ms_protobuf_generate_py(PROTO_SRCS PY_HDRS PY_PYS ${PROTO_FILE}) |
|
|
|
else() |
|
|
|
ms_protobuf_generate(PROTO_SRCS PROTO_HDRS ${PROTO_FILE}) |
|
|
|
endif() |
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows") |
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -DHAVE_SNPRINTF") |
|
|
|
add_compile_definitions(BUILDING_DLL) |
|
|
|
@@ -31,7 +39,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") |
|
|
|
endif() |
|
|
|
|
|
|
|
set_property(SOURCE ${CORE_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_CORE) |
|
|
|
add_library(mindspore_core STATIC ${CORE_SRC_LIST}) |
|
|
|
add_library(mindspore_core STATIC ${CORE_SRC_LIST} ${PROTO_SRCS}) |
|
|
|
target_link_libraries(mindspore_core PRIVATE mindspore_gvar) |
|
|
|
if(NOT(COMPILE_LITE)) |
|
|
|
target_link_libraries(mindspore_core PRIVATE mindrt_mid) |
|
|
|
|