Disable Wimplicit-int-float-conversion warning in googletest

PiperOrigin-RevId: 524031046
This commit is contained in:
Richard O'Grady 2023-04-13 10:03:01 -07:00
parent 108139d275
commit 8325392950
1 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,8 @@ endif(SNAPPY_REQUIRE_AVX2)
# Used by googletest. # Used by googletest.
check_cxx_compiler_flag(-Wno-missing-field-initializers check_cxx_compiler_flag(-Wno-missing-field-initializers
SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS) SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
check_cxx_compiler_flag(-Wno-implicit-int-float-conversion
SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
include(CheckCXXSourceCompiles) include(CheckCXXSourceCompiles)
check_cxx_source_compiles(" check_cxx_source_compiles("
@ -334,6 +336,11 @@ if(SNAPPY_BUILD_TESTS)
APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers) APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS) endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
if(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
set_property(TARGET gtest
APPEND PROPERTY COMPILE_OPTIONS -Wno-implicit-int-float-conversion)
endif(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
add_executable(snappy_unittest "") add_executable(snappy_unittest "")
target_sources(snappy_unittest target_sources(snappy_unittest
PRIVATE PRIVATE