Skip to content

Commit fa1ffec

Browse files
committed
Disable warnings in googletest code
GCC 13 issues a maybe-uninitialized warning on googletest code. Use -w to disable it. Note: MSVC understands -w
1 parent 669eb3e commit fa1ffec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ if(CPPDAP_BUILD_TESTS)
301301
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
302302
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
303303
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
304+
# googletest has -Werror=maybe-uninitialized problem.
305+
# Disable all warnings in googletest code.
306+
target_compile_options(gtest PRIVATE -w)
304307
endif()
305308

306309
add_executable(cppdap-unittests ${DAP_TEST_LIST})

0 commit comments

Comments
 (0)