bsd.sys.mk: add NO_WCHARACTER_CONVERSION and use it for googletest

This silences warnings about benign implicit character conversions in
googletest's gtest-printers.h.
This commit is contained in:
Dimitry Andric
2025-12-25 21:05:51 +01:00
parent 63d1c3c436
commit ae31c10537
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -10,3 +10,6 @@ CXXFLAGS+= ${GTESTS_FLAGS}
# Silence warnings about usage of deprecated implicit copy constructors
CXXWARNFLAGS+= -Wno-deprecated-copy
# Silence warnings about implicit character conversions in gtest-printers.h
CXXWARNFLAGS+= ${NO_WCHARACTER_CONVERSION}
+3
View File
@@ -133,6 +133,9 @@ NO_WARRAY_PARAMETER= -Wno-array-parameter
NO_WSTRICT_PROTOTYPES= -Wno-strict-prototypes
NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype
.endif
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 210000
NO_WCHARACTER_CONVERSION=-Wno-character-conversion
.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200
NO_WUNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
.endif
+3
View File
@@ -10,3 +10,6 @@ GTESTS_CXXFLAGS+= -frtti
CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private
NO_WTHREAD_SAFETY=
# Silence warnings about implicit character conversions in gtest-printers.h
CXXWARNFLAGS+= ${NO_WCHARACTER_CONVERSION}