Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build:cmake:aarch64 refine alerts and replace ENV{ACL_ROOT_DIR} #1801

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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