Browse Source

add macro

tags/v1.2.0
chenyemeng 4 years ago
parent
commit
c81c2e80da
7 changed files with 16 additions and 0 deletions
  1. +1
    -0
      ge/CMakeLists.txt
  2. +2
    -0
      ge/common/CMakeLists.txt
  3. +5
    -0
      ge/ge_local_engine/CMakeLists.txt
  4. +1
    -0
      ge/ge_runtime/CMakeLists.txt
  5. +1
    -0
      ge/graph/build/memory/CMakeLists.txt
  6. +5
    -0
      ge/host_cpu_engine/CMakeLists.txt
  7. +1
    -0
      ge/plugin/engine/CMakeLists.txt

+ 1
- 0
ge/CMakeLists.txt View File

@@ -768,6 +768,7 @@ add_library(opensrc_ascendcl SHARED

target_compile_definitions(opensrc_ascendcl PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_compile_options(opensrc_ascendcl PRIVATE


+ 2
- 0
ge/common/CMakeLists.txt View File

@@ -133,6 +133,7 @@ target_compile_definitions(ge_common_static 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>
LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_compile_options(ge_common_static PRIVATE
@@ -181,6 +182,7 @@ target_compile_definitions(ge_common PRIVATE
FMK_SUPPORT_DUMP
OS_CENTOS
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_compile_options(ge_common PRIVATE


+ 5
- 0
ge/ge_local_engine/CMakeLists.txt View File

@@ -31,6 +31,7 @@ target_compile_options(ge_local_engine PRIVATE

target_compile_definitions(ge_local_engine PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(ge_local_engine PRIVATE
@@ -72,6 +73,7 @@ target_compile_options(atc_ge_local_engine PRIVATE
target_compile_definitions(atc_ge_local_engine PRIVATE
COMPILE_OMG_PACKAGE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(atc_ge_local_engine PRIVATE
@@ -117,6 +119,7 @@ target_compile_options(ge_local_opskernel_builder PRIVATE

target_compile_definitions(ge_local_opskernel_builder PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(ge_local_opskernel_builder PRIVATE
@@ -158,6 +161,7 @@ target_compile_options(atc_ge_local_opskernel_builder PRIVATE

target_compile_definitions(atc_ge_local_opskernel_builder PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(atc_ge_local_opskernel_builder PRIVATE
@@ -205,6 +209,7 @@ target_compile_options(ge_local_opskernel_builder_static PRIVATE
target_compile_definitions(ge_local_opskernel_builder_static PRIVATE
google=ascend_private
LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(ge_local_opskernel_builder_static PRIVATE


+ 1
- 0
ge/ge_runtime/CMakeLists.txt View File

@@ -27,6 +27,7 @@ target_compile_options(ge_runtime PRIVATE

target_compile_definitions(ge_runtime PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(ge_runtime PRIVATE


+ 1
- 0
ge/graph/build/memory/CMakeLists.txt View File

@@ -20,6 +20,7 @@ target_compile_options(ge_memory PRIVATE
target_compile_definitions(ge_memory PRIVATE
google=ascend_private
LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_link_libraries(ge_memory PRIVATE


+ 5
- 0
ge/host_cpu_engine/CMakeLists.txt View File

@@ -25,6 +25,7 @@ target_compile_options(host_cpu_engine PRIVATE

target_compile_definitions(host_cpu_engine PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(host_cpu_engine PRIVATE
@@ -65,6 +66,7 @@ target_compile_options(atc_host_cpu_engine PRIVATE
target_compile_definitions(atc_host_cpu_engine PRIVATE
COMPILE_OMG_PACKAGE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(atc_host_cpu_engine PRIVATE
@@ -109,6 +111,7 @@ target_compile_options(host_cpu_opskernel_builder PRIVATE

target_compile_definitions(host_cpu_opskernel_builder PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(host_cpu_opskernel_builder PRIVATE
@@ -149,6 +152,7 @@ target_compile_options(atc_host_cpu_opskernel_builder PRIVATE

target_compile_definitions(atc_host_cpu_opskernel_builder PRIVATE
google=ascend_private
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(atc_host_cpu_opskernel_builder PRIVATE
@@ -195,6 +199,7 @@ target_compile_options(host_cpu_opskernel_builder_static PRIVATE
target_compile_definitions(host_cpu_opskernel_builder_static PRIVATE
google=ascend_private
LOG_CPP
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(host_cpu_opskernel_builder_static PRIVATE


+ 1
- 0
ge/plugin/engine/CMakeLists.txt View File

@@ -14,6 +14,7 @@ target_compile_options(engine PRIVATE
target_compile_definitions(engine PRIVATE
REUSE_MEMORY=1
PROTOBUF_INLINE_NOT_IN_HEADERS=0
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)

target_include_directories(engine PRIVATE


Loading…
Cancel
Save