diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index bfe735a9b..1ec5a27e3 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -20,8 +20,6 @@ dependencies: - doxygen - gcc_linux-64=11.* - geopandas>=0.11.0 -- gmock>=1.13.0 -- gtest>=1.13.0 - ipython - ipywidgets - libcudf==24.6.* diff --git a/conda/environments/all_cuda-122_arch-x86_64.yaml b/conda/environments/all_cuda-122_arch-x86_64.yaml index 65795726e..9619b19fb 100644 --- a/conda/environments/all_cuda-122_arch-x86_64.yaml +++ b/conda/environments/all_cuda-122_arch-x86_64.yaml @@ -23,8 +23,6 @@ dependencies: - doxygen - gcc_linux-64=11.* - geopandas>=0.11.0 -- gmock>=1.13.0 -- gtest>=1.13.0 - ipython - ipywidgets - libcudf==24.6.* diff --git a/conda/recipes/libcuspatial/meta.yaml b/conda/recipes/libcuspatial/meta.yaml index 659aa511c..c423f96e0 100644 --- a/conda/recipes/libcuspatial/meta.yaml +++ b/conda/recipes/libcuspatial/meta.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. {% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %} {% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} @@ -46,8 +46,6 @@ requirements: host: - cuda-version ={{ cuda_version }} - doxygen - - gmock {{ gtest_version }} - - gtest {{ gtest_version }} - libcudf ={{ minor_version }} - librmm ={{ minor_version }} - sqlite @@ -129,5 +127,3 @@ outputs: - cuda-cudart {% endif %} - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - - gmock {{ gtest_version }} - - gtest {{ gtest_version }} diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 1de36d515..8908617b1 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -107,7 +107,8 @@ rapids_cpm_init() include(cmake/thirdparty/get_cudf.cmake) # find or install GoogleTest if (CUSPATIAL_BUILD_TESTS) - include(cmake/thirdparty/get_gtest.cmake) + include(${rapids-cmake-dir}/cpm/gtest.cmake) + rapids_cpm_gtest(BUILD_STATIC) endif() # find or add ranger include (cmake/thirdparty/get_ranger.cmake) @@ -222,7 +223,7 @@ endif() if(CUSPATIAL_BUILD_BENCHMARKS) # Find or install GoogleBench include(${rapids-cmake-dir}/cpm/gbench.cmake) - rapids_cpm_gbench() + rapids_cpm_gbench(BUILD_STATIC) # Find or install NVBench Temporarily force downloading of fmt because current versions of nvbench # do not support the latest version of fmt, which is automatically pulled into our conda diff --git a/cpp/cmake/thirdparty/get_gtest.cmake b/cpp/cmake/thirdparty/get_gtest.cmake deleted file mode 100644 index 45ef26f0a..000000000 --- a/cpp/cmake/thirdparty/get_gtest.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# ============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. -# ============================================================================= - -# This function finds gtest and sets any additional necessary environment variables. -function(find_and_configure_gtest) - include(${rapids-cmake-dir}/cpm/gtest.cmake) - - # Find or install GoogleTest - rapids_cpm_gtest(BUILD_EXPORT_SET cuspatial-testing-exports INSTALL_EXPORT_SET cuspatial-testing-exports) - - if(GTest_ADDED) - rapids_export( - BUILD GTest - VERSION ${GTest_VERSION} - EXPORT_SET GTestTargets - GLOBAL_TARGETS gtest gmock gtest_main gmock_main - NAMESPACE GTest:: - ) - - include("${rapids-cmake-dir}/export/find_package_root.cmake") - rapids_export_find_package_root( - BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] cuspatial-testing-exports - ) - endif() - -endfunction() - -find_and_configure_gtest() diff --git a/cpp/cuproj/CMakeLists.txt b/cpp/cuproj/CMakeLists.txt index 35ba0277e..061a627ca 100644 --- a/cpp/cuproj/CMakeLists.txt +++ b/cpp/cuproj/CMakeLists.txt @@ -95,8 +95,9 @@ include(cmake/thirdparty/get_rmm.cmake) # find or install GoogleTest and Proj if (CUPROJ_BUILD_TESTS) - include(cmake/thirdparty/get_gtest.cmake) - include(cmake/thirdparty/get_proj.cmake) + include(${rapids-cmake-dir}/cpm/gtest.cmake) + rapids_cpm_gtest(BUILD_STATIC) + include(cmake/thirdparty/get_proj.cmake) endif() ################################################################################################### @@ -162,7 +163,7 @@ endif() if(CUPROJ_BUILD_BENCHMARKS) # Find or install GoogleBench include(${rapids-cmake-dir}/cpm/gbench.cmake) - rapids_cpm_gbench() + rapids_cpm_gbench(BUILD_STATIC) # Find or install NVBench Temporarily force downloading of fmt because current versions of nvbench # do not support the latest version of fmt, which is automatically pulled into our conda diff --git a/cpp/cuproj/cmake/thirdparty/get_gtest.cmake b/cpp/cuproj/cmake/thirdparty/get_gtest.cmake deleted file mode 100644 index 0eaa54d25..000000000 --- a/cpp/cuproj/cmake/thirdparty/get_gtest.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# ============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. -# ============================================================================= - -# This function finds gtest and sets any additional necessary environment variables. -function(find_and_configure_gtest) - include(${rapids-cmake-dir}/cpm/gtest.cmake) - - # Find or install GoogleTest - rapids_cpm_gtest(BUILD_EXPORT_SET cuproj-testing-exports INSTALL_EXPORT_SET cuproj-testing-exports) - - if(GTest_ADDED) - rapids_export( - BUILD GTest - VERSION ${GTest_VERSION} - EXPORT_SET GTestTargets - GLOBAL_TARGETS gtest gmock gtest_main gmock_main - NAMESPACE GTest:: - ) - - include("${rapids-cmake-dir}/export/find_package_root.cmake") - rapids_export_find_package_root( - BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] cuproj-testing-exports - ) - endif() - -endfunction() - -find_and_configure_gtest() diff --git a/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp b/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp index fb4fab6db..9e5a61ef8 100644 --- a/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp +++ b/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp @@ -21,6 +21,8 @@ #include #include +#include + struct LinestringBoundingBoxErrorTest : public ::testing::Test {}; using T = float; diff --git a/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp b/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp index 83be1f845..f80c2734d 100644 --- a/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp +++ b/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp @@ -23,6 +23,8 @@ #include #include +#include + struct PolygonBoundingBoxErrorTest : public ::testing::Test {}; using T = float; diff --git a/cpp/tests/join/quadtree_point_in_polygon_test.cpp b/cpp/tests/join/quadtree_point_in_polygon_test.cpp index 592e7a52e..51884756f 100644 --- a/cpp/tests/join/quadtree_point_in_polygon_test.cpp +++ b/cpp/tests/join/quadtree_point_in_polygon_test.cpp @@ -28,6 +28,8 @@ #include #include +#include + #include using T = float; diff --git a/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp b/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp index bfca5b024..d04848010 100644 --- a/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp +++ b/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp @@ -28,6 +28,8 @@ #include #include +#include + #include using T = float; diff --git a/dependencies.yaml b/dependencies.yaml index d04502adf..97af06191 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -122,8 +122,6 @@ dependencies: packages: - c-compiler - cxx-compiler - - gmock>=1.13.0 - - gtest>=1.13.0 - libcudf==24.6.* - librmm==24.6.* - proj @@ -167,8 +165,6 @@ dependencies: packages: - c-compiler - cxx-compiler - - gmock>=1.13.0 - - gtest>=1.13.0 - librmm==24.6.* - proj - sqlite