Lunderberg commented on a change in pull request #8822:
URL: https://github.com/apache/tvm/pull/8822#discussion_r695068131
##########
File path: cmake/modules/Hexagon.cmake
##########
@@ -47,41 +47,10 @@ function(find_hexagon_toolchain)
endif()
endfunction()
-function(find_hexagon_sdk_root)
- if(FOUND_HEXAGON_SDK_ROOT)
- return()
- endif()
- message(STATUS "Checking Hexagon SDK root: ${USE_HEXAGON_SDK}")
- file(GLOB_RECURSE HEXAGON_AEESTDDEF "${USE_HEXAGON_SDK}/*/AEEStdDef.h")
- if(HEXAGON_AEESTDDEF)
- # The path is ${HEXAGON_SDK_ROOT}/incs/stddef/AEEStdDef.h.
- get_filename_component(HEXAGON_TMP0 "${HEXAGON_AEESTDDEF}" DIRECTORY)
- get_filename_component(HEXAGON_TMP1 "${HEXAGON_TMP0}" DIRECTORY)
- get_filename_component(HEXAGON_TMP2 "${HEXAGON_TMP1}" DIRECTORY)
- set(HEXAGON_SDK_ROOT "${HEXAGON_TMP2}" CACHE PATH
- "Root directory of Hexagon SDK")
- set(FOUND_HEXAGON_SDK_ROOT TRUE)
- else(HEXAGON_AEESTDDEF)
- message(SEND_ERROR "Cannot validate Hexagon SDK in ${USE_HEXAGON_SDK}")
- endif()
-endfunction()
-
if(BUILD_FOR_HEXAGON)
- find_hexagon_sdk_root()
- if(HEXAGON_SDK_ROOT MATCHES "3.5.1")
- message(SEND_ERROR "Hexagon SDK 3.5.1 is not supported")
- elseif(HEXAGON_SDK_ROOT MATCHES "3\.[0-9]+\.[0-9]+")
- include_directories(
- SYSTEM "${USE_HEXAGON_SDK}/libs/common/qurt/ADSPv62MP/include/posix"
- SYSTEM "${USE_HEXAGON_SDK}/libs/common/qurt/ADSPv62MP/include/qurt")
- else()
- include_directories(
- SYSTEM "${HEXAGON_SDK_ROOT}/rtos/qurt/computev65/include/posix"
- SYSTEM "${HEXAGON_SDK_ROOT}/rtos/qurt/computev65/include/qurt")
- endif()
- include_directories(
- SYSTEM "${HEXAGON_SDK_ROOT}/incs"
- SYSTEM "${HEXAGON_SDK_ROOT}/incs/stddef")
+ find_hexagon_sdk_root("${USE_HEXAGON_SDK}" "v66")
+ # Add SDK and QuRT includes when building for Hexagon.
+ include_directories(SYSTEM ${HEXAGON_SDK_INCLUDES} ${HEXAGON_QURT_INCLUDES})
Review comment:
That was my guess, since ubuntu18.04 is on 3.10 in the repo. It would
be nice to have a newer version, but not worth dropping support. It looks like
the `CMakeLists.txt` declares a [minimum version of cmake
3.2](https://github.com/apache/tvm/blob/main/CMakeLists.txt#L1), while the
[documentation gives
3.5](https://github.com/apache/tvm/blob/main/docs/install/from_source.rst#L63).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]