Skip to content

Commit

Permalink
Use cache variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 3, 2023
1 parent 893da3b commit 52138c1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,14 @@ function(build_gtest)
endif()
set(BUILD_SHARED_LIBS ON)
set(BUILD_STATIC_LIBS OFF)
set(INSTALL_GTEST OFF)
# We need to use "cache" variable to override the default
# INSTALL_GTEST option by this value. See also:
# https://cmake.org/cmake/help/latest/policy/CMP0077.html
set(INSTALL_GTEST
OFF
CACHE "BOOL"
"Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)"
FORCE)
string(APPEND CMAKE_INSTALL_INCLUDEDIR "/arrow-gtest")
fetchcontent_makeavailable(googletest)
set_target_properties(gmock PROPERTIES OUTPUT_NAME "arrow_gmock")
Expand Down

0 comments on commit 52138c1

Please sign in to comment.