提交 597e4fce 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!413 [MS]eliminate securec warning

Merge pull request !413 from chenjianping/eliminate-securec-warning
......@@ -9,6 +9,9 @@ if (NOT TARGET securec)
set(_ms_tmp_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${SECURE_CXX_FLAGS}")
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_compile_definitions(SECUREC_ONLY_DECLARE_MEMSET)
endif()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/securec ${CMAKE_BINARY_DIR}/securec)
set(CMAKE_POSITION_INDEPENDENT_CODE ${_ms_tmp_CMAKE_POSITION_INDEPENDENT_CODE})
set(CMAKE_C_FLAGS ${_ms_tmp_CMAKE_C_FLAGS})
......
......@@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#add flags
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -Wno-attributes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -Werror")
endif()
......
aux_source_directory(. SECUREC_SRCS)
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
list(APPEND SECUREC_SRCS "memset_s.c")
else()
aux_source_directory(. SECUREC_SRCS)
endif()
add_library(securec STATIC ${SECUREC_SRCS})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册