From 122e0dc899d947d90bd916e397a8cc234f227fe4 Mon Sep 17 00:00:00 2001 From: Mark Horvath Date: Tue, 9 Jan 2024 14:19:20 +0100 Subject: [PATCH] [build] Fix the building of the SVE2 sources So far, due to the faulty handling of the INTRINSICCV_ENABLE_SVE2 and INTRINSICCV_ENABLE_SVE2_SELECTIVELY options it was impossible to build the SVE2 implementations. --- intrinsiccv/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/intrinsiccv/CMakeLists.txt b/intrinsiccv/CMakeLists.txt index 3604e77b5..4eb6ead8b 100644 --- a/intrinsiccv/CMakeLists.txt +++ b/intrinsiccv/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Arm Limited and/or its affiliates +# SPDX-FileCopyrightText: 2023-2024 Arm Limited and/or its affiliates # # SPDX-License-Identifier: Apache-2.0 @@ -17,13 +17,13 @@ if (INTRINSICCV_ENABLE_SVE2 AND INTRINSICCV_ENABLE_SVE2_SELECTIVELY) message(FATAL_ERROR "[IntrinsicCV] INTRINSICCV_ENABLE_SVE2 and INTRINSICCV_ENABLE_SVE2_SELECTIVELY cannot be set at the same time") endif() -set(INTRINSICCV_BUILD_SVE2, INTRINSICCV_ENABLE_SVE2 OR INTRINSICCV_ENABLE_SVE2_SELECTIVELY) - -if (INTRINSICCV_BUILD_SVE2) +set(INTRINSICCV_BUILD_SVE2 OFF) +if (INTRINSICCV_ENABLE_SVE2 OR INTRINSICCV_ENABLE_SVE2_SELECTIVELY) check_cxx_compiler_flag("-march=armv8-a+sve2" INTRINSICCV_COMPILER_SUPPORTS_SVE2) if (NOT INTRINSICCV_COMPILER_SUPPORTS_SVE2) - set(INTRINSICCV_BUILD_SVE2 OFF) message(STATUS "[IntrinsicCV] Compiler does not support SVE2") + else() + set(INTRINSICCV_BUILD_SVE2 ON) endif() endif() -- GitLab