Skip to content

Commit

Permalink
Avoid checking for arm/aarch64 in toolchain path (#420)
Browse files Browse the repository at this point in the history
Since the CMAKE_CXX_COMPILER contains the full path including directory
components, this check will enable Arm intrinsics even on non-Arm
platforms if the directory the compiler resides in happens to contain
the substring "arm", for example:

        /home/parma/toolchains/g++-14
               ^^^

CMAKE_SYSTEM_PROCESSOR already specifies the target architecture so
there is no need to additionally check the compiler string, therefore we
simply remove this condition.
  • Loading branch information
georges-arm authored Sep 25, 2024
1 parent a1996a8 commit 06a223c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ message( STATUS "CMAKE_MODULE_PATH: updating module path to: ${CMAKE_MODULE_PATH
# check for arm architecture support
set( VVENC_ARM_SIMD_DEFAULT FALSE )
if( ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64\|arm"
OR "${CMAKE_CXX_COMPILER}" MATCHES "aarch64\|arm"
OR "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64\|armv" )
AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "x86\|x64" )
set( VVENC_ARM_SIMD_DEFAULT TRUE )
Expand Down

0 comments on commit 06a223c

Please sign in to comment.