Skip to content

Use FindGTest instead of FindGTestSoure.cmake - #6482

Open
jmackay2 wants to merge 4 commits into
PointCloudLibrary:masterfrom
jmackay2:remove_gtest_source
Open

jmackay2 wants to merge 4 commits into
PointCloudLibrary:masterfrom
jmackay2:remove_gtest_source

Conversation

@jmackay2

@jmackay2 jmackay2 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

This switches to use the standard FindGTest.cmake.

Tested on Ubuntu 24.04 (with GTest 1.14.0) and Ubuntu 26.04 (with GTest 1.17.0).

@jmackay2
jmackay2 marked this pull request as ready for review September 24, 2026 02:11
@jmackay2

Copy link
Copy Markdown
Contributor Author

It looks like macos has a build failure when installing openni saying the checksum patch is different. This is unrelated to this PR.
https://dev.azure.com/PointCloudLibrary/pcl/_build/results?buildId=26632&view=logs&j=8042da28-3549-5cef-c93d-1a000d12f42a&t=09180b85-7beb-5fb9-9ff7-cfbb7dc5f69d

@mvieth

mvieth commented Sep 24, 2026

Copy link
Copy Markdown
Member

Installing openni via brew has been unsuccessful for some time, but apparently the pipeline did not fail because after that, the cloning of the googletest source code was successful which made the whole pipeline step successful. Now that the failing brew install openni is the last step, it makes the whole pipeline fail. Can you remove the brew install openni command? It seems like there is currently no way to install openni via homebrew.

Comment thread test/CMakeLists.txt
add_library(pcl_gtest STATIC ${GTEST_SRC_DIR}/src/gtest-all.cc)
target_include_directories(pcl_gtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
add_library(pcl_gtest INTERFACE)
target_link_libraries(pcl_gtest INTERFACE GTest::gtest)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCL currently still supports CMake versions < 3.20, so you would have to check the version here and use GTest::GTest instead if below 3.20 (GTest::gtest was added in 3.20)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants