include(${CMAKE_CURRENT_LIST_DIR}/targets-tikicpulib.cmake) set(PRODUCT_TYPE_LIST_V100_ ascend910;Ascend910A;Ascend910B;Ascend910PremiumA;Ascend910ProA;Ascend910ProB) set(PRODUCT_TYPE_LIST_V200_ ascend610;ascend310p;Ascend310P1;Ascend310P3) set(PRODUCT_TYPE_LIST_V220_ ascend910B1;Ascend910B1;Ascend910B2;Ascend910B2C;Ascend910B3;Ascend910B4;Ascend910B4-1;Ascend910C1;Ascend910C2;Ascend910C3;Ascend910C4;Ascend910C4-1) set(PRODUCT_TYPE_LIST_M300_ ascend310B1;Ascend310B1;Ascend310B2;Ascend310B3;Ascend310B4) set(PRODUCT_TYPE_LIST_M310_ ascend610Lite;Ascend610Lite) function(product_map str newstr) if("${str}" IN_LIST PRODUCT_TYPE_LIST_V100_) set(${newstr} "ascend910" PARENT_SCOPE) elseif("${str}" IN_LIST PRODUCT_TYPE_LIST_V200_) set(${newstr} "ascend310p" PARENT_SCOPE) elseif("${str}" IN_LIST PRODUCT_TYPE_LIST_V220_) set(${newstr} "ascend910B1" PARENT_SCOPE) elseif("${str}" IN_LIST PRODUCT_TYPE_LIST_M300_) set(${newstr} "ascend310B1" PARENT_SCOPE) elseif("${str}" IN_LIST PRODUCT_TYPE_LIST_M310_) set(${newstr} "ascend610Lite" PARENT_SCOPE) endif() endfunction() foreach(product_type ${PRODUCT_TYPE_LIST_V100_} ${PRODUCT_TYPE_LIST_V200_} ${PRODUCT_TYPE_LIST_V220_} ${PRODUCT_TYPE_LIST_M300_} ${PRODUCT_TYPE_LIST_M310_}) product_map(${product_type} product_type_series) if (NOT TARGET tikicpulib_${product_type_series}_interpreter) add_library(tikicpulib_${product_type_series}_interpreter INTERFACE) target_link_libraries(tikicpulib_${product_type_series}_interpreter INTERFACE tikicpulib_${product_type_series}) endif() add_library(tikicpulib::${product_type} ALIAS tikicpulib_${product_type_series}_interpreter) endforeach()