-
Notifications
You must be signed in to change notification settings - Fork 280
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
Fix gtest-not-found bug #1040
Fix gtest-not-found bug #1040
Conversation
@sloretz can you please try this with Debian Buster? |
@jwhendy Can you also check if this fixes your build issues on Arch? |
@@ -226,16 +227,19 @@ endfunction() | |||
# :param[out] gmock_main_libs: GMock's main libraries | |||
# :param[out] base_dir: The base directory containing Google Test and/or GMock CMakeLists.txt | |||
# | |||
function(catkin_find_google_test_source include_path src_path | |||
function(catkin_find_google_test_source gtest_path googletest_path |
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.
Obviously this is changing the signature of the function, but I'm pretty sure the only place that's calling it is in this file; it's not really an external interface, so it should be safe to change.
I can confirm that the I do get a bunch of warnings like this, but they don't seem to affect the build.
Edit: this is one output from my Thanks for taking a stab at this @mikepurvis ! |
@jwhendy Please provide more context: what platform are you seeing these warnings on, what version of CMake are you using? Also this seems to be unrelated to this PR. Can you please check if the same warning happens with older versions of |
I'm able to build on Debian buster up to and including
From above, highlighting:
|
@dirk-thomas sorry on the delay, I was out of town. It is unrelated to this PR, but not unrelated to my overall issues of getting catkin and gmock to work on Arch in #1030. I forgot that I already commented on this over there. I'll add a followup comment there instead of muddying the waters here, but this is almost certainly an issue on how to get Arch + gmock package files correct, nothing to do with catkin. Sorry about that. |
I think this is from the CMakeLists.txt shipped with googletest, so it can be ignored. # Where Google Test's .h files can be found.
set(gtest_build_include_dirs
"${gtest_SOURCE_DIR}/include"
"${gtest_SOURCE_DIR}")
include_directories(${gtest_build_include_dirs}) |
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.
I don't understand why this works, but it works on Debian Buster. LGTM, though I haven't tried it on all platforms.
🤐
🚢 🤞 |
Thanks to everyone for creating / testing the patch. |
|
||
# Path to gtest from the googletest Debian package. | ||
list(APPEND _gtest_include_paths "${googletest_path}/googletest/include/gtest") | ||
list(APPEND _gtest_source_paths "${googletest_path}/googletest/googletest/src") |
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.
The double "googletest" seems to be a mistake. The include
and src
directories should be siblings. See #1088.
This change fixes #1030, which arises from the changes made in #1022.
It works for me on Ubuntu 16.04, but it should be checked by a user on Debian Buster to confirm that the original fix still works as expected.