kou commented on code in PR #34765:
URL: https://github.com/apache/arrow/pull/34765#discussion_r1152796004


##########
cpp/cmake_modules/SetupCxxFlags.cmake:
##########
@@ -115,6 +115,9 @@ elseif(ARROW_CPU_FLAG STREQUAL "aarch64")
   if(ARROW_SIMD_LEVEL STREQUAL "DEFAULT")
     set(ARROW_SIMD_LEVEL "NEON")
   endif()
+  if(APPLE)
+    set(GTest_SOURCE "BUNDLED")
+  endif()

Review Comment:
   Can we use `try_compile()` 
https://cmake.org/cmake/help/latest/command/try_compile.html for this like we 
did for gRPC 
https://github.com/apache/arrow/blob/ddd0a337174e57cdc80b1ee30dc7e787acfc09f6/cpp/src/arrow/flight/CMakeLists.txt#L119-L123
 ?
   
   I think that checking `INTERFACE_COMPILE_FEATURES` isn't so portable.
   For example, `libgtest-dev` on Debian/Ubuntu still uses `cxx_std_11` not 
`cxx_std_14`.
   
   For CMake target conflict, we can use different CMake target names (such as 
`arrow::GTest::gtest`) and CMake variables to refer suitable CMake targets 
(such as `set(ARROW_GTEST_GTEST arrow::GTest::gtest)`) like we did for 
Zstandard: 
https://github.com/apache/arrow/blob/ddd0a337174e57cdc80b1ee30dc7e787acfc09f6/cpp/cmake_modules/ThirdpartyToolchain.cmake#L2577-L2589



-- 
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]

Reply via email to