Skip to content

Commit f98b026

Browse files
committed
Minor clean-up
1 parent 30e6af3 commit f98b026

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,20 +2862,14 @@ function(build_re2)
28622862
# Unity build causes some build errors
28632863
set(CMAKE_UNITY_BUILD OFF)
28642864

2865-
# ATTEMPT #7: Prevent RE2 from adding install() commands
2866-
message(STATUS "ATTEMPT #7: Using CMAKE_SKIP_INSTALL_RULES to disable RE2 install")
2867-
set(_arrow_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES})
2865+
# Disable install rules for RE2 so it is not installed on our Linux-packages.
28682866
set(CMAKE_SKIP_INSTALL_RULES ON)
28692867

28702868
fetchcontent_makeavailable(re2)
28712869

2872-
# Restore the original value
2873-
set(CMAKE_SKIP_INSTALL_RULES ${_arrow_skip_install_rules})
2874-
2875-
# Create an empty cmake_install.cmake so include() doesn't fail
2870+
# We have to create an empty cmake_install.cmake so include() doesn't fail but doesn't install anything.
28762871
file(WRITE "${re2_BINARY_DIR}/cmake_install.cmake"
28772872
"# RE2 install disabled via CMAKE_SKIP_INSTALL_RULES\n")
2878-
message(STATUS "Created empty cmake_install.cmake for RE2")
28792873

28802874
set(ARROW_BUNDLED_STATIC_LIBS
28812875
${ARROW_BUNDLED_STATIC_LIBS} re2::re2
@@ -3227,7 +3221,7 @@ function(build_grpc)
32273221
"$<TARGET_FILE:protobuf::protoc>"
32283222
CACHE STRING "" FORCE)
32293223

3230-
# gRPC needs this at configure time for add_custom_command.
3224+
# gRPC needs this at configure time.
32313225
get_filename_component(_protobuf_root_dir "${protobuf_SOURCE_DIR}" DIRECTORY)
32323226
set(_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR
32333227
"${_protobuf_root_dir}/src"
@@ -3270,23 +3264,16 @@ function(build_grpc)
32703264
" -Wno-attributes -Wno-format-security -Wno-unknown-warning-option")
32713265
endif()
32723266

3273-
# ATTEMPT #7: Prevent gRPC from adding install() commands by setting CMAKE_SKIP_INSTALL_RULES
3274-
# This must be set BEFORE fetchcontent_makeavailable processes gRPC's CMakeLists.txt
3275-
message(STATUS "ATTEMPT #7: Using CMAKE_SKIP_INSTALL_RULES to disable gRPC install")
3276-
set(_arrow_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES})
3267+
# Disable install rules for gRPC so it is not installed on our Linux-packages.
32773268
set(CMAKE_SKIP_INSTALL_RULES ON)
32783269

32793270
fetchcontent_makeavailable(grpc)
32803271

3281-
# Restore the original value so Arrow's install rules still work
3282-
set(CMAKE_SKIP_INSTALL_RULES ${_arrow_skip_install_rules})
3283-
32843272
# CMAKE_SKIP_INSTALL_RULES prevents cmake_install.cmake from being created,
32853273
# but the parent cmake_install.cmake still tries to include() it.
32863274
# Create an empty one manually so include() doesn't fail.
32873275
file(WRITE "${grpc_BINARY_DIR}/cmake_install.cmake"
32883276
"# gRPC install disabled via CMAKE_SKIP_INSTALL_RULES\n")
3289-
message(STATUS "Created empty cmake_install.cmake for gRPC")
32903277

32913278
# FetchContent builds gRPC libraries without gRPC:: prefix.
32923279
# Create gRPC:: alias targets for consistency.

0 commit comments

Comments
 (0)