bug fix for glog level don't work
This commit is contained in:
parent
d46a0e4d69
commit
25a67602b7
|
@ -52,6 +52,12 @@ install(
|
|||
COMPONENT mindspore
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS mindspore_gvar
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
COMPONENT mindspore
|
||||
)
|
||||
|
||||
if (USE_GLOG)
|
||||
file(GLOB_RECURSE GLOG_LIB_LIST ${glog_LIBPATH}/libglog*)
|
||||
install(
|
||||
|
|
|
@ -235,6 +235,7 @@ set_target_properties(_c_expression PROPERTIES INSTALL_RPATH ${ORIGIN_PATH})
|
|||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
target_link_libraries(mindspore mindspore::pybind11_module)
|
||||
target_link_libraries(mindspore mindspore_gvar)
|
||||
target_link_libraries(_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive)
|
||||
else ()
|
||||
if (ENABLE_CPU AND (ENABLE_D OR ENABLE_GPU))
|
||||
|
@ -245,6 +246,7 @@ else ()
|
|||
endif()
|
||||
target_link_libraries(_c_expression PRIVATE -Wl,--whole-archive mindspore -Wl,--no-whole-archive)
|
||||
target_link_libraries(_c_expression PRIVATE mindspore::pybind11_module)
|
||||
target_link_libraries(_c_expression PRIVATE mindspore_gvar)
|
||||
endif ()
|
||||
|
||||
if (USE_GLOG)
|
||||
|
@ -288,7 +290,7 @@ add_library(inference SHARED
|
|||
${LOAD_ONNX_SRC}
|
||||
)
|
||||
target_link_libraries(inference PRIVATE ${PYTHON_LIBRARIES} ${SECUREC_LIBRARY}
|
||||
-Wl,--whole-archive mindspore -Wl,--no-whole-archive mindspore::protobuf)
|
||||
-Wl,--whole-archive mindspore -Wl,--no-whole-archive mindspore_gvar mindspore::protobuf)
|
||||
|
||||
if (ENABLE_CPU)
|
||||
target_link_libraries(inference PRIVATE mindspore::dnnl mindspore::mkldnn)
|
||||
|
|
|
@ -126,7 +126,7 @@ endif()
|
|||
######################################################################
|
||||
|
||||
################# Link with external libraries ########################
|
||||
target_link_libraries(_c_dataengine PRIVATE mindspore)
|
||||
target_link_libraries(_c_dataengine PRIVATE mindspore mindspore_gvar)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
if (ENABLE_PYTHON)
|
||||
target_link_libraries(_c_dataengine PRIVATE mindspore::pybind11_module ${PYTHON_LIBRARIES} mindspore::protobuf ${SECUREC_LIBRARY})
|
||||
|
|
|
@ -28,9 +28,9 @@ set_target_properties(_c_mindrecord PROPERTIES
|
|||
|
||||
# add link library
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
target_link_libraries(_c_mindrecord PRIVATE mindspore::sqlite mindspore mindspore::protobuf)
|
||||
target_link_libraries(_c_mindrecord PRIVATE mindspore::sqlite mindspore mindspore_gvar mindspore::protobuf)
|
||||
else()
|
||||
target_link_libraries(_c_mindrecord PRIVATE mindspore::sqlite ${PYTHON_LIB} ${SECUREC_LIBRARY} mindspore mindspore::protobuf)
|
||||
target_link_libraries(_c_mindrecord PRIVATE mindspore::sqlite ${PYTHON_LIB} ${SECUREC_LIBRARY} mindspore mindspore_gvar mindspore::protobuf)
|
||||
endif()
|
||||
|
||||
if (USE_GLOG)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/mindspore/core)
|
||||
add_subdirectory(gvar)
|
||||
message("************build core***************")
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
|
@ -14,10 +15,10 @@ file(GLOB_RECURSE CORE_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|||
"c_ops/*.cc"
|
||||
"ir/*.cc"
|
||||
"utils/*.cc"
|
||||
"gvar/*.cc"
|
||||
)
|
||||
set_property(SOURCE ${CORE_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_CORE)
|
||||
add_library(mindspore_core STATIC ${CORE_SRC_LIST})
|
||||
target_link_libraries(mindspore_core PRIVATE mindspore_gvar)
|
||||
if (USE_GLOG)
|
||||
target_link_libraries(mindspore_core PRIVATE mindspore::glog)
|
||||
endif ()
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
file(GLOB_RECURSE MS_GVAR_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cc)
|
||||
set_property(SOURCE ${MS_GVAR_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_COMMON)
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -DHAVE_SNPRINTF")
|
||||
add_compile_definitions(BUILDING_DLL)
|
||||
endif()
|
||||
|
||||
add_library(mindspore_gvar SHARED ${MS_GVAR_SRC_LIST})
|
||||
if (APPLE)
|
||||
set_target_properties(mindspore_gvar PROPERTIES MACOSX_RPATH ON)
|
||||
endif ()
|
|
@ -110,5 +110,5 @@ if (ENABLE_ACL)
|
|||
target_link_libraries(ms_serving ${ALC_LIB_SO})
|
||||
target_link_libraries(ms_serving jpeg_turbo::jpeg)
|
||||
else ()
|
||||
target_link_libraries(ms_serving inference)
|
||||
target_link_libraries(ms_serving inference mindspore_gvar)
|
||||
endif ()
|
||||
|
|
|
@ -180,12 +180,12 @@ if (ENABLE_GE)
|
|||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(ut_tests PRIVATE mindspore::gtest ${PYTHON_LIBRARIES} pthread util dl)
|
||||
target_link_libraries(ut_tests PRIVATE mindspore::gtest mindspore_gvar ${PYTHON_LIBRARIES} pthread util dl)
|
||||
if (ENABLE_MINDDATA)
|
||||
target_link_libraries(ut_tests PRIVATE _c_dataengine _c_mindrecord)
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(ut_tests PRIVATE mindspore::gtest ${PYTHON_LIBRARIES})
|
||||
target_link_libraries(ut_tests PRIVATE mindspore::gtest mindspore_gvar ${PYTHON_LIBRARIES})
|
||||
endif()
|
||||
if (USE_GLOG)
|
||||
target_link_libraries(ut_tests PRIVATE mindspore::glog)
|
||||
|
|
Loading…
Reference in New Issue