Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .ci/azure-pipelines/build/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ steps:
fetchDepth: 10
- script: |
brew install cmake
brew install pkg-config boost eigen flann nanoflann glew libusb qhull vtk glew freeglut qt libpcap libomp suite-sparse zlib google-benchmark cjson
brew install brewsci/science/openni
git clone https://github.com/abseil/googletest.git $GOOGLE_TEST_DIR # the official endpoint changed to abseil/googletest
cd $GOOGLE_TEST_DIR && git checkout release-1.8.1
brew install pkg-config boost eigen flann nanoflann glew libusb qhull vtk glew freeglut qt libpcap libomp suite-sparse zlib google-benchmark cjson googletest
displayName: 'Install Dependencies'
- script: |
mkdir $BUILD_DIR && cd $BUILD_DIR
cmake $(Build.SourcesDirectory) \
-DCMAKE_BUILD_TYPE="MinSizeRel" \
-DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX$(OSX_VERSION).sdk" \
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
-DGTEST_SRC_DIR="$GOOGLE_TEST_DIR/googletest" \
-DGTEST_INCLUDE_DIR="$GOOGLE_TEST_DIR/googletest/include" \
-DPCL_ONLY_CORE_POINT_TYPES=ON \
-DBUILD_surface_on_nurbs=ON -DUSE_UMFPACK=ON \
-DBUILD_simulation=ON \
Expand Down
41 changes: 0 additions & 41 deletions cmake/Modules/FindGTestSource.cmake

This file was deleted.

8 changes: 4 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ if(NOT build)
return()
endif()

find_package(GTestSource REQUIRED)
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS} ${GTEST_SRC_DIR})
find_package(GTest REQUIRED)

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)

target_include_directories(pcl_gtest INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)

enable_testing()

Expand Down
Loading