You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
End up being just -I, which then causes an -I to appear in the compile command for users building against the arrow project, which in our case (and I assume all cases?) is invalid. Specifically, the behavior we saw was nothing inside of the std:: namespace could be referenced anymore
As an example, taking out a sub portion of our compile command which was generated with this issue: -pthread -I -std=gnu++17
A solution here would be to not generate any Cflags in the case that GTEST_INCLUDE_DIR isn't set. The -I in Cflags: -I${gtest_includedir} needs to be created conditionally. I'll try to add a PR in the next few days to address the issue.
Component(s)
C++
The text was updated successfully, but these errors were encountered:
kou
changed the title
arrow-testing.pc.in's Cflags are incorrectly set if gtest isn't built as part of the arrow build
[C++] arrow-testing.pc.in's Cflags are incorrectly set if gtest isn't built as part of the arrow build
Jan 20, 2023
…est (#33812)
### Rationale for this change
Empty `-I` in `Cflags:` generates an invalid build command line.
### What changes are included in this PR?
Add `Requires: gtest` if `gtest.pc` exists.
Add `Cflags: -I...` and `Libs: /.../libgtest.a` if `gtest.pc` doesn't exist.
Bundled GoogleTest isn't supported yet.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
* Closes: #33796
Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…oogleTest (apache#33812)
### Rationale for this change
Empty `-I` in `Cflags:` generates an invalid build command line.
### What changes are included in this PR?
Add `Requires: gtest` if `gtest.pc` exists.
Add `Cflags: -I...` and `Libs: /.../libgtest.a` if `gtest.pc` doesn't exist.
Bundled GoogleTest isn't supported yet.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
Yes.
* Closes: apache#33796
Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
If we don't build gtest as part of the arrow build process (we could get it pre-built somewhere else), then the following variable is unset:
arrow/cpp/src/arrow/arrow-testing.pc.in
Line 22 in bf8780d
Which is currently only set in the
macro(build_gtest)
cmake function found here:arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake
Line 2003 in 359f28b
As a result the Cflags generated in:
arrow/cpp/src/arrow/arrow-testing.pc.in
Line 29 in bf8780d
End up being just
-I
, which then causes an-I
to appear in the compile command for users building against the arrow project, which in our case (and I assume all cases?) is invalid. Specifically, the behavior we saw was nothing inside of thestd::
namespace could be referenced anymoreAs an example, taking out a sub portion of our compile command which was generated with this issue:
-pthread -I -std=gnu++17
A solution here would be to not generate any Cflags in the case that
GTEST_INCLUDE_DIR
isn't set. The-I
inCflags: -I${gtest_includedir}
needs to be created conditionally. I'll try to add a PR in the next few days to address the issue.Component(s)
C++
The text was updated successfully, but these errors were encountered: