Browse Source

Fix windows compile.

pull/1535/head
unknown 4 years ago
parent
commit
823c4c1e69
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      ge/executor/CMakeLists.txt

+ 4
- 0
ge/executor/CMakeLists.txt View File

@@ -22,12 +22,16 @@ add_library(ge_proto_dump STATIC
target_compile_definitions(ge_proto_dump PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
google=ascend_private
$<IF:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,OS_TYPE=WIN,OS_TYPE=0>
$<$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX>
)

target_compile_options(ge_proto_dump PRIVATE
-O2
-fno-common
-fvisibility=hidden
$<$<AND:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,$<STREQUAL:${CMAKE_CONFIGURATION_TYPES},Debug>>:/MTd>
$<$<AND:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,$<STREQUAL:${CMAKE_CONFIGURATION_TYPES},Release>>:/MT>
)

target_link_libraries(ge_proto_dump PRIVATE


Loading…
Cancel
Save