From fd9161960d60fc6ef7c69ce52f76941bb0ebc36a Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Thu, 1 Aug 2024 15:59:09 -0700
Subject: [PATCH] Compile C++ files with -Wundef
Bug: aomedia:356830476
Change-Id: I044beb802362dde359b628ccd8891ca621c04f4b
---
build/cmake/aom_configure.cmake | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/build/cmake/aom_configure.cmake b/build/cmake/aom_configure.cmake
index 20859469c7..e204eda656 100644
--- a/build/cmake/aom_configure.cmake
+++ b/build/cmake/aom_configure.cmake
@@ -352,6 +352,7 @@ else()
add_compiler_flag_if_supported("-Wsign-compare")
add_compiler_flag_if_supported("-Wstring-conversion")
add_compiler_flag_if_supported("-Wtype-limits")
+ add_compiler_flag_if_supported("-Wundef")
add_compiler_flag_if_supported("-Wuninitialized")
add_compiler_flag_if_supported("-Wunreachable-code-aggressive")
add_compiler_flag_if_supported("-Wunused")
@@ -379,9 +380,6 @@ else()
add_compiler_flag_if_supported("-Wno-disabled-optimization")
endif()
- # Add -Wundef only for C files to avoid massive gtest warning spam.
- add_c_flag_if_supported("-Wundef")
-
# Quiet gcc 6 vs 7 abi warnings:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728
if(AOM_TARGET_CPU MATCHES "arm")