Skip to content

Commit

Permalink
build:cmake:aarch64 refine alerts and replace ENV{ACL_ROOT_DIR}
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu2k committed Feb 8, 2024
1 parent 5df84c5 commit 2d11573
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions cmake/ACL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,29 @@ find_package(ACL REQUIRED)
set(ACL_MINIMUM_VERSION "23.11")

if(ACL_FOUND)
file(GLOB_RECURSE ACL_VERSION_FILE $ENV{ACL_ROOT_DIR}/*/arm_compute_version.embed)
file(GLOB_RECURSE ACL_VERSION_FILE ${ACL_INCLUDE_DIR}/*/arm_compute_version.embed)
if ("${ACL_VERSION_FILE}" STREQUAL "")
message(WARNING "Build may fail: Could not determine ACL version (minimum required is ${ACL_MINIMUM_VERSION})")
message(WARNING
"Build may fail. Could not determine ACL version.\n"
"Supported ACL versions:\n"
"- minimum required is ${ACL_MINIMUM_VERSION}\n"
)
else()
file(READ ${ACL_VERSION_FILE} ACL_VERSION_STRING)
string(REGEX MATCH "v([0-9]+\\.[0-9]+\\.?[0-9]*)" ACL_VERSION "${ACL_VERSION_STRING}")
set(ACL_VERSION "${CMAKE_MATCH_1}")
if ("${ACL_VERSION}" VERSION_EQUAL "0.0")
# Unreleased ACL versions come with version string "v0.0-unreleased", and may not be compatible with oneDNN.
# It is recommended to use the latest release of ACL.
message(WARNING "Build may fail: Using unreleased ACL version (minimum required is ${ACL_MINIMUM_VERSION})")
message(WARNING
"Build may fail. Using unreleased ACL version.\n"
"Supported ACL versions:\n"
"- minimum required is ${ACL_MINIMUM_VERSION}\n"
)
elseif("${ACL_VERSION}" VERSION_LESS "${ACL_MINIMUM_VERSION}")
message(FATAL_ERROR "Detected ACL version ${ACL_VERSION}, but minimum required is ${ACL_MINIMUM_VERSION}")
message(FATAL_ERROR
"Detected ACL version ${ACL_VERSION}, but minimum required is ${ACL_MINIMUM_VERSION}\n"
)
endif()
endif()

Expand Down

0 comments on commit 2d11573

Please sign in to comment.