set(CMAKE_CXX_FLAGS_DEBUG "") set(CMAKE_CXX_FLAGS_RELEASE "") if (NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "") endif() if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/build_out" CACHE PATH "" FORCE) endif() if (NOT DEFINED ASCEND_CANN_PACKAGE_PATH) set(ASCEND_CANN_PACKAGE_PATH /usr/local/Ascend/latest CACHE PATH "") endif() if (NOT DEFINED ASCEND_PYTHON_EXECUTABLE) set(ASCEND_PYTHON_EXECUTABLE python3 CACHE STRING "") endif() if (NOT DEFINED ASCEND_COMPUTE_UNIT) set(ASCEND_COMPUTE_UNIT ascend910b;ascend310p CACHE STRING "") endif() if (NOT DEFINED ENABLE_TEST) set(ENABLE_TEST FALSE CACHE BOOL "") endif() if (NOT DEFINED ENABLE_CROSS_COMPILE) set(ENABLE_CROSS_COMPILE FALSE CACHE BOOL "") endif() if (NOT DEFINED CMAKE_CROSS_PLATFORM_COMPILER) set(CMAKE_CROSS_PLATFORM_COMPILER "/your/cross/compiler/path" CACHE PATH "") endif() set(ASCEND_TENSOR_COMPILER_PATH ${ASCEND_CANN_PACKAGE_PATH}/compiler) set(ASCEND_CCEC_COMPILER_PATH ${ASCEND_TENSOR_COMPILER_PATH}/ccec_compiler/bin) set(ASCEND_AUTOGEN_PATH ${CMAKE_BINARY_DIR}/autogen) file(MAKE_DIRECTORY ${ASCEND_AUTOGEN_PATH}) set(CUSTOM_COMPILE_OPTIONS "custom_compile_options.ini") execute_process(COMMAND rm -rf ${ASCEND_AUTOGEN_PATH}/${CUSTOM_COMPILE_OPTIONS} COMMAND touch ${ASCEND_AUTOGEN_PATH}/${CUSTOM_COMPILE_OPTIONS})