kou opened a new issue, #35252:
URL: https://github.com/apache/arrow/issues/35252

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   `FindGTestAlt.cmake` uses `-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}` to 
check whether found GoogleTest can be used with Apache Arrow C++.
   
   `find_package(Arrow)` also uses `FindGTestAlt.cmake`. Apache Arrow C++ 
always sets `CMAKE_CXX_STANDARD`. So 
`-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}` has no problem. But a project that 
uses `find_package(Arrow)` may not set `CMAKE_CXX_STANDARD`. In this case, 
`try_compile()` is failed with the following message:
   
   ```text
   The CXX_STANDARD property on target "cmTC_ce38e" contained an invalid
     value: "".
   ```
   
   * GoogleTest is used by `ArrowTesting` not `Arrow`. So we should put it to 
`ArrowTesting/`.
   * `CMAKE_CXX_STANDARD` check is needed only when Apache Arrow C++ finds 
GoogleTest. It's not needed when `find_package(Arrow)` because suitable 
GoogleTest should be found by `find_package(GTestAlot)`. 
   
   ### Component(s)
   
   C++


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