Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2229,15 +2229,15 @@ if(ARROW_TESTING)
1.10.0
USE_CONFIG
${GTEST_USE_CONFIG})
get_target_property(gtest_cxx_standard GTest::gtest INTERFACE_COMPILE_FEATURES)

if((${gtest_cxx_standard} STREQUAL "cxx_std_11") OR (${gtest_cxx_standard} STREQUAL
"cxx_std_14"))
message(FATAL_ERROR "System GTest is built with a C++ standard lower than 17. Use bundled GTest via passing in CMake flag
if(GTest_SOURCE STREQUAL "SYSTEM")
get_target_property(gtest_cxx_standard GTest::gtest INTERFACE_COMPILE_FEATURES)
if((${gtest_cxx_standard} STREQUAL "cxx_std_11") OR (${gtest_cxx_standard} STREQUAL
"cxx_std_14"))
message(FATAL_ERROR "System GTest is built with a C++ standard lower than 17. Use bundled GTest via passing in CMake flag
-DGTest_SOURCE=\"BUNDLED\"")
endif()
endif()

if(GTest_SOURCE STREQUAL "SYSTEM")
find_package(PkgConfig QUIET)
pkg_check_modules(gtest_PC
gtest
Expand Down