You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "bkietz (via GitHub)" <gi...@apache.org> on 2023/09/07 13:59:11 UTC

[GitHub] [arrow] bkietz commented on issue #36379: [C++] Bundled GTest CI jobs seem to `#include`ing GTest headers from somewhere else

bkietz commented on issue #36379:
URL: https://github.com/apache/arrow/issues/36379#issuecomment-1710204228

   The problem is actually more subtle: when the dependency's source is AUTO, ThirdpartyToolchain.cmake checks for a compatible system package. If the system package is not compatible, it will build a bundled version. https://github.com/apache/arrow/blob/ad7f6ef3a97be6a3eb6fe37d0df1b1634db057d2/cpp/cmake_modules/ThirdpartyToolchain.cmake#L287-L292
   
   Building the bundled dependency adds its include directories... but it *appends them* so include directories which are already added have precedence. In this case the incompatible gtest headers from the conda environment are not being overridden by the bundled headers. It should be sufficient to use `target_include_directories()` with the `BEFORE` keyword to ensure that bundled projects' headers can override system headers


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org