Skip to content

Commit e2af261

Browse files
author
Tor Didriksen
committed
Bug #32433090 RUN CLANG-TIDY MODERNIZE-USE-EQUALS-DEFAULT OVER THE CODE BASE [prerequisite]
Prerequisite patch to get a clean build with system protobuf. Add cmake code to ignore -Wextra-semi warnings. System protoc (on Fedora 33) is version 3.12.4 and generates things like: inline Expr() : Expr(nullptr) {}; whereas our bundled protoc is version 3.11.4 and generates Expr(); for the same input. Change-Id: I0009d2f83406092ba3c4f9268997c262f1316bb3
1 parent e68f71b commit e2af261

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

unittest/gunit/xplugin/xcl/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ SET(XCL_UNIT_TESTS xclient_unit_tests)
3535

3636
INCLUDE(source_files.cmake)
3737

38+
# There may be extra semicolons in code generated by protobuf.
39+
MY_CHECK_CXX_COMPILER_WARNING("-Wextra-semi" HAS_WARN_FLAG)
40+
IF(HAS_WARN_FLAG)
41+
STRING_APPEND(CMAKE_CXX_FLAGS " ${HAS_WARN_FLAG}")
42+
ENDIF()
43+
3844
# This compiler fails to handle some of the mock functions involved.
3945
IF(MY_COMPILER_IS_SUNPRO)
4046
LIST(REMOVE_ITEM XCL_TEST_SRC

unittest/gunit/xplugin/xpl/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ SET(XPL_UNIT_TESTS xplugin_unit_tests)
3030

3131
INCLUDE(source_files.cmake)
3232

33+
# There may be extra semicolons in code generated by protobuf.
34+
MY_CHECK_CXX_COMPILER_WARNING("-Wextra-semi" HAS_WARN_FLAG)
35+
IF(HAS_WARN_FLAG)
36+
STRING_APPEND(CMAKE_CXX_FLAGS " ${HAS_WARN_FLAG}")
37+
ENDIF()
38+
3339
# This compiler fails to handle some of the mock functions involved.
3440
IF(MY_COMPILER_IS_SUNPRO)
3541
LIST(REMOVE_ITEM XPL_TEST_SRC

0 commit comments

Comments
 (0)