File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed
shared/offline_compiler/source Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ set(GLOBAL PROPERTY NEO_L0_COMPONENTS_LIST "")
5151
5252set (BRANCH_TYPE "" )
5353set (BRANCH_DIR_SUFFIX "/${BRANCH_TYPE} " )
54+ list (APPEND BRANCH_DIR_LIST "/" )
55+ if (NOT "${BRANCH_TYPE} " STREQUAL "" )
56+ list (APPEND BRANCH_DIR_LIST "/${BRANCH_TYPE} /" )
57+ endif ()
58+ message (STATUS "branch dir list: ${BRANCH_DIR_LIST} " )
5459
5560if (TR_DEPRECATED)
5661 add_definitions (-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1)
Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ macro(macro_for_each_platform)
4949 endforeach ()
5050
5151 foreach (PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER} .inl" )
52- list (APPEND RUNTIME_SRCS_${GEN_TYPE} _CPP_BASE ${GENX_PREFIX} /${PLATFORM_FILE} )
52+ foreach (BRANCH_DIR ${BRANCH_DIR_LIST} )
53+ if (EXISTS ${GENX_PREFIX}${BRANCH_DIR}${PLATFORM_FILE} )
54+ list (APPEND RUNTIME_SRCS_${GEN_TYPE} _CPP_BASE ${GENX_PREFIX}${BRANCH_DIR}${PLATFORM_FILE} )
55+ endif ()
56+ endforeach ()
5357 endforeach ()
5458
5559 list (APPEND RUNTIME_SRCS_${GEN_TYPE} _CPP_LINUX ${GENX_PREFIX} /linux/hw_info_config_${PLATFORM_IT_LOWER} .inl)
Original file line number Diff line number Diff line change @@ -90,15 +90,24 @@ set(RUNTIME_GENX_CPP_FILES
9090)
9191
9292macro (macro_for_each_platform)
93- list (APPEND CLOC_LIB_SRCS_LIB ${NEO_SOURCE_DIR} /opencl/source /${GEN_TYPE_LOWER} /hw_info_${PLATFORM_IT_LOWER} .inl)
93+ foreach (BRANCH_DIR ${BRANCH_DIR_LIST} )
94+ if (EXISTS ${NEO_SOURCE_DIR} /opencl/source /${GEN_TYPE_LOWER}${BRANCH_DIR} hw_info_${PLATFORM_IT_LOWER} .inl)
95+ list (APPEND CLOC_LIB_SRCS_LIB ${NEO_SOURCE_DIR} /opencl/source /${GEN_TYPE_LOWER} /${BRANCH_DIR} hw_info_${PLATFORM_IT_LOWER} .inl)
96+ endif ()
97+ endforeach ()
9498endmacro ()
9599
96100macro (macro_for_each_gen)
97101 foreach (SRC_IT ${RUNTIME_GENX_CPP_FILES} )
98- set (SRC_FILE ${NEO_SOURCE_DIR} /opencl/source /${GEN_TYPE_LOWER} /${SRC_IT} )
99- if (EXISTS ${SRC_FILE} _${GEN_TYPE_LOWER} .cpp)
100- list (APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE} _${GEN_TYPE_LOWER} .cpp)
101- endif ()
102+ foreach (BRANCH_DIR ${BRANCH_DIR_LIST} )
103+ set (SRC_FILE ${NEO_SOURCE_DIR} /opencl/source /${GEN_TYPE_LOWER}${BRANCH_DIR}${SRC_IT} )
104+ string (REGEX REPLACE "/$" "" _BRANCH_SUFFIX "${BRANCH_DIR} " )
105+ string (REGEX REPLACE "^/" "_" _BRANCH_SUFFIX "${_BRANCH_SUFFIX} " )
106+
107+ if (EXISTS ${SRC_FILE} _${GEN_TYPE_LOWER}${_BRANCH_SUFFIX} .cpp)
108+ list (APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE} _${GEN_TYPE_LOWER}${_BRANCH_SUFFIX} .cpp)
109+ endif ()
110+ endforeach ()
102111 endforeach ()
103112 apply_macro_for_each_platform()
104113
You can’t perform that action at this time.
0 commit comments