kou opened a new pull request, #43465:
URL: https://github.com/apache/arrow/pull/43465

   ### Rationale for this change
   
   If we use bundled GoogleTest and system other dependencies such as Boost, 
our include path options may be:
   
   * `-isystem /opt/homebrew/include` (for Boost)
   * `-isystem build_dir/_deps/googletest-src/googletest` (for bundled 
GoogleTest)
   * `-isystem build_dir/_deps/googletest-src/googlemock` (for bundled 
GoogleTest)
   
   With this order, GoogleTest headers in `/opt/homebrew/include/` are used 
with bundled GoogleTest. It may cause link errors.
   
   ### What changes are included in this PR?
   
   This change introduces a new CMake target
   `arrow::GTest::gtest_headers` that has include paths for bundled GoogleTest. 
And it's always used as the first link library of all test program. With this 
change, our include path options are:
   
   * `-isystem build_dir/_deps/googletest-src/googletest` (for bundled 
GoogleTest)
   * `-isystem build_dir/_deps/googletest-src/googlemock` (for bundled 
GoogleTest)
   * `-isystem /opt/homebrew/include` (for Boost)
   
   With this order, we can always use our bundled GoogleTest.
   
   `arrow::GTest::gtest_headers` is defined only when we use bundled 
GoogleTest. So this doesn't change the system GoogleTest case.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   Yes.


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