kou commented on issue #34861:
URL: https://github.com/apache/arrow/issues/34861#issuecomment-1494968807
We may want to move the change to `if(GTest_SOURCE STREQUAL "SYSTEM")`:
```diff
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index caf33f224b..c0b289cea8 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -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_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()
+ 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()
- if(GTest_SOURCE STREQUAL "SYSTEM")
find_package(PkgConfig QUIET)
pkg_check_modules(gtest_PC
gtest
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]