[x265] [PATCH v2 3/3] AArch64: Compile intrinsics files with -Werror
Hari Limaye
hari.limaye at arm.com
Tue Aug 20 21:50:29 UTC 2024
Add an option to build with -Werror when compiling AArch64 intrinsics
files to ensure that code is free from compiler warnings. The option is
OFF by default.
---
source/CMakeLists.txt | 2 ++
source/common/CMakeLists.txt | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index e509c6473..3c0c6d167 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -85,6 +85,8 @@ elseif(ARM64MATCH GREATER "-1")
message(STATUS "Detected ARM64 target processor")
set(ARM64 1)
+ option(AARCH64_WARNINGS_AS_ERRORS "Build with -Werror for AArch64 Intrinsics files" OFF)
+
# Options for cross compiling AArch64 optional extensions
option(CROSS_COMPILE_SVE "Cross Compile for SVE Target" OFF)
option(CROSS_COMPILE_SVE2 "Cross Compile for SVE2 Target" OFF)
diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt
index 47b23bcd2..b70de654b 100644
--- a/source/common/CMakeLists.txt
+++ b/source/common/CMakeLists.txt
@@ -136,6 +136,10 @@ if(ENABLE_ASSEMBLY AND (ARM64 OR CROSS_COMPILE_ARM64))
endif()
source_group(Assembly FILES ${ASM_PRIMITIVES})
+
+ if(AARCH64_WARNINGS_AS_ERRORS)
+ set_source_files_properties(${ASM_PRIMITIVES} PROPERTIES COMPILE_FLAGS -Werror)
+ endif()
endif(ENABLE_ASSEMBLY AND (ARM64 OR CROSS_COMPILE_ARM64))
if(POWER)
--
2.42.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0003-AArch64-Compile-intrinsics-files-with-Werror.patch
Type: text/x-patch
Size: 1752 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240820/b26fa66b/attachment.bin>
More information about the x265-devel
mailing list