Skip to content

Commit c6cf16a

Browse files
cblichmanncopybara-github
authored andcommitted
Update dependencies to most recent versions
- Remove protobuf workaround for `cmake/` sub-directory - Suppress "file has no symbols" warning on macOS PiperOrigin-RevId: 452774099 Change-Id: I0aad124789a304cfa06062e1db71bcb0e74f5223
1 parent b144f86 commit c6cf16a

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

cmake/BinExportDeps.cmake

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ include(FetchContent)
2525
# Googletest
2626
FetchContent_Declare(googletest
2727
GIT_REPOSITORY https://github.com/google/googletest.git
28-
GIT_TAG 9ca071b6e55568dff6960bebe1a5cfaa180fb3ce # 2021-11-10
28+
GIT_TAG 0320f517fd920866d918e564105d68fd4362040a # 2022-06-01
2929
)
3030
FetchContent_MakeAvailable(googletest)
3131
binexport_check_target(gtest)
@@ -35,19 +35,18 @@ binexport_check_target(gmock)
3535
# Abseil
3636
FetchContent_Declare(absl
3737
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
38-
GIT_TAG f2dbd918d8d08529800eb72f23bd2829f92104a4 # 2021-11-11
38+
GIT_TAG fa5d5f4c262ce3d42bfe35439913162aef45ee23 # 2022-06-02
3939
)
4040
set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
41+
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
4142
set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
4243
FetchContent_MakeAvailable(absl)
4344
binexport_check_target(absl::core_headers)
4445

4546
# Protocol Buffers
4647
FetchContent_Declare(protobuf
4748
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
48-
GIT_TAG 47e05427e3341c9b18fff047e7d9f79af0dafe9b # 2021-11-11
49-
GIT_SUBMODULES "cmake" # Workaround for CMake #20579
50-
SOURCE_SUBDIR cmake
49+
GIT_TAG v21.1 # 2022-05-28
5150
)
5251
set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
5352
set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)

cmake/CompileOptions.cmake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
2525

2626
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # GCC
2727
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # Clang or Apple Clang
28-
add_compile_options(-Wno-nullability-completeness)
28+
add_compile_options(
29+
-Wno-nullability-completeness
30+
-Wno-invalid-noreturn
31+
)
2932
elseif(MSVC) # Visual Studio
3033
add_compile_options(
3134
/wd4018 # signed/unsigned mismatch
@@ -54,6 +57,16 @@ if(UNIX)
5457
if(APPLE)
5558
add_compile_options(-gfull)
5659
add_link_options(-dead_strip)
60+
61+
# Suppress ranlib warnings "file has no symbols"
62+
set(CMAKE_C_ARCHIVE_CREATE
63+
"<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
64+
set(CMAKE_CXX_ARCHIVE_CREATE
65+
"<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
66+
set(CMAKE_C_ARCHIVE_FINISH
67+
"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
68+
set(CMAKE_CXX_ARCHIVE_FINISH
69+
"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
5770
else()
5871
add_compile_options(
5972
-ffunction-sections

0 commit comments

Comments
 (0)