WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
177055
[cmake] Use public and interface compile options for gtest target
https://bugs.webkit.org/show_bug.cgi?id=177055
Summary
[cmake] Use public and interface compile options for gtest target
Konstantin Tokarev
Reported
2017-09-17 09:50:35 PDT
Instead of duplicating them at place of use. Should also fix Mac CMake build
Attachments
Patch
(4.47 KB, patch)
2017-09-18 03:57 PDT
,
Konstantin Tokarev
mcatanzaro
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Konstantin Tokarev
Comment 1
2017-09-18 03:57:37 PDT
Created
attachment 321086
[details]
Patch
Michael Catanzaro
Comment 2
2017-09-18 06:21:27 PDT
Comment on
attachment 321086
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=321086&action=review
Well it mostly looks good, except...
> Tools/TestWebKitAPI/CMakeLists.txt:16 > set(TestWebKitAPI_LIBRARIES > WTF${DEBUG_SUFFIX} > + gtest > )
See here's the thing: I tried to do this last week, because I was getting a weird linker error without it. Then I discovered that my test was passing even when my gtest assertion was failing. It's a footgun: I was trying to use gtest from the injected bundle, which doesn't work. It's better to get a linker error in that case. Looking at the other targets in this file... gtest is already explicitly included for TestWebKitAPIBase. So I guess you need it in TestWTF, right? Try adding it there instead. Worst comes to worst, we might need to make TestWebKitAPIInjectedBundle not use TestWebKitAPI_LIBRARIES. But hopefully not.
Konstantin Tokarev
Comment 3
2017-09-18 06:30:14 PDT
Thing that got me hurt is that Tools/TestWebKitAPI/config.h (which is included into TestWebKitAPIInjectedBundle as well) includes gtest/gtest.h, which means whatever defines are used with gtest, same should be used with TestWebKitAPIInjectedBundle. Probably better solution is to include gtest/gtest.h where it can be actually used
Michael Catanzaro
Comment 4
2017-09-18 06:35:30 PDT
(In reply to Konstantin Tokarev from
comment #3
)
> Probably better solution is to include gtest/gtest.h where it can be > actually used
Agreed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug