-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-34813: [C++] Improve GoogleTest detection #34920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
d8ccf7e to
199647d
Compare
|
@github-actions crossbow submit test-alpine-linux-cpp |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit test-alpine-linux-cpp |
This comment was marked as outdated.
This comment was marked as outdated.
0b9cf98 to
3440365
Compare
|
@github-actions crossbow submit test-alpine-linux-cpp |
This comment was marked as outdated.
This comment was marked as outdated.
If incompatible GoogleTest is detected, we can fallback to bundled GoogleTest automatically.
|
@github-actions crossbow submit test-alpine-linux-cpp |
|
Revision: 3815328 Submitted crossbow builds: ursacomputing/crossbow @ actions-e991323147
|
|
Confirming that the latest version of the PR seems to work for me (with a gtest from conda): On a previous version I got an error like "CMake Error: The source directory "SOURCES/CMakeFiles/CMakeTmp" does not exist" from FindGTestAlt.cmake:53 (try_compile) |
|
|
||
| set(ARROW_TEST_LINK_TOOLCHAIN arrow::flatbuffers GTest::gtest_main GTest::gtest | ||
| GTest::gmock) | ||
| set(ARROW_TEST_LINK_TOOLCHAIN arrow::flatbuffers ${ARROW_GTEST_GTEST_MAIN} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this is a regression as using variables instead of targets is an anti-pattern but I currently don't see a cleaner approach either.
I think we should rethink the entire dependency management once we have bumped the cmake version to 3.16 as we will have much better tools available. (this is of course out of scope for this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use add_library(ALIAS) with CMake 3.11: https://cmake.org/cmake/help/latest/command/add_library.html#alias-libraries
Thanks for confirming this!
Yes. I needed to write a code to work with newer CMake and older CMake. On a previous version this implementation worked only with newer CMake. |
|
+1 |
|
Benchmark runs are scheduled for baseline = 6f3d96e and contender = f7644ae. f7644ae is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
|
This is a regression - build fails for me (macos/arm64/conda). The only reason I could get it building is because I've been tracking this issue and knew to supply the proper BUNDLED flag. At least before the cmake module prompted you to put the flag in place if it detected the installed binaries weren't c++17. It's back to the old behavior, build fails with the symbols it can't resolve. |
|
Could you open a new issue with how to reproduce and full error log? At least I can't reproduce it with macOS/arm64/Homebrew(not conda). |
|
Sure. Any specific flags you want me to pass to the build process for
debugging/error log purposes?
…On Sat, Apr 8, 2023 at 7:12 PM Sutou Kouhei ***@***.***> wrote:
Could you open a new issue with how to reproduce and full error log?
At least I can't reproduce it with macOS/arm64/Homebrew(not conda).
—
Reply to this email directly, view it on GitHub
<#34920 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC74BGOJK7CBX6ZWKIJDOGDXAILJ5ANCNFSM6AAAAAAWU3LK3E>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
|
### Rationale for this change apache#34765 approach has some corner cases. They causes CI failures. ### What changes are included in this PR? If incompatible GoogleTest is detected, we can fallback to bundled GoogleTest automatically. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: apache#34813 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
### Rationale for this change apache#34765 approach has some corner cases. They causes CI failures. ### What changes are included in this PR? If incompatible GoogleTest is detected, we can fallback to bundled GoogleTest automatically. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: apache#34813 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Rationale for this change
#34765 approach has some corner cases. They causes CI failures.
What changes are included in this PR?
If incompatible GoogleTest is detected, we can fallback to bundled GoogleTest automatically.
Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.