Skip to content

Commit 5022520

Browse files
authored
Use static GTest (#729)
This switches cuOpt to fetch GTest with CPM and statically link it into the test executables. This removes the conda dependency on gtest and aligns with what we do in cuDF and other RAPIDS libraries. Authors: - Bradley Dice (https://github.com/bdice) - Ramakrishnap (https://github.com/rgsl888prabhu) Approvers: - Gil Forsyth (https://github.com/gforsyth) - Ramakrishnap (https://github.com/rgsl888prabhu) URL: #729
1 parent 2da7b39 commit 5022520

File tree

8 files changed

+1
-23
lines changed

8 files changed

+1
-23
lines changed

conda/environments/all_cuda-129_arch-aarch64.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ dependencies:
2727
- exhale
2828
- fastapi
2929
- gcc_linux-aarch64=14.*
30-
- gmock
31-
- gtest
3230
- ipython
3331
- jsonref==1.1.0
3432
- libcudss-dev >=0.7

conda/environments/all_cuda-129_arch-x86_64.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ dependencies:
2727
- exhale
2828
- fastapi
2929
- gcc_linux-64=14.*
30-
- gmock
31-
- gtest
3230
- ipython
3331
- jsonref==1.1.0
3432
- libcudss-dev >=0.7

conda/environments/all_cuda-130_arch-aarch64.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ dependencies:
2727
- exhale
2828
- fastapi
2929
- gcc_linux-aarch64=14.*
30-
- gmock
31-
- gtest
3230
- ipython
3331
- jsonref==1.1.0
3432
- libcudss-dev >=0.7

conda/environments/all_cuda-130_arch-x86_64.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ dependencies:
2727
- exhale
2828
- fastapi
2929
- gcc_linux-64=14.*
30-
- gmock
31-
- gtest
3230
- ipython
3331
- jsonref==1.1.0
3432
- libcudss-dev >=0.7

conda/recipes/libcuopt/conda_build_config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ c_stdlib_version:
1515

1616
cmake_version:
1717
- ">=3.30.4"
18-
19-
gtest_version:
20-
- ">=1.13.0"

conda/recipes/libcuopt/recipe.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ cache:
6565
host:
6666
- cpp-argparse
6767
- cuda-version =${{ cuda_version }}
68-
- gmock ${{ gtest_version }}
69-
- gtest ${{ gtest_version }}
7068
- libraft-headers =${{ minor_version }}
7169
- librmm =${{ minor_version }}
7270
- rapids-logger =0.2
@@ -112,7 +110,6 @@ outputs:
112110
- cuda-cudart
113111
- cuda-nvtx
114112
- cuda-version
115-
- gtest
116113
- libcurand
117114
- libcudss
118115
- libcusparse
@@ -168,7 +165,6 @@ outputs:
168165
- cuda-cudart
169166
- cuda-nvtx
170167
- cuda-version
171-
- gtest
172168
- libcudss
173169
- libcurand
174170
- libcusparse
@@ -203,23 +199,18 @@ outputs:
203199
- ${{ pin_subpackage("libcuopt", exact=True) }}
204200
- ${{ pin_subpackage("libmps-parser", exact=True) }}
205201
- boost
206-
- gmock ${{ gtest_version }}
207-
- gtest ${{ gtest_version }}
208202
- cuda-cudart-dev
209203
- libcublas
210204
- libcudss-dev >=0.7
211205
- libcusparse-dev
212206
run:
213-
- gmock ${{ gtest_version }}
214-
- gtest ${{ gtest_version }}
215207
- ${{ pin_subpackage("libcuopt", exact=True) }}
216208
- ${{ pin_subpackage("libmps-parser", exact=True) }}
217209
ignore_run_exports:
218210
by_name:
219211
- cuda-cudart
220212
- cuda-nvtx
221213
- cuda-version
222-
- gtest
223214
- libcurand
224215
- libcusparse
225216
- libcudss

cpp/cmake/thirdparty/get_gtest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
function(find_and_configure_gtest)
77
include(${rapids-cmake-dir}/cpm/gtest.cmake)
8-
rapids_cpm_gtest()
8+
rapids_cpm_gtest(BUILD_STATIC)
99
endfunction()
1010

1111
find_and_configure_gtest()

dependencies.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ dependencies:
307307
- output_types: [conda]
308308
packages:
309309
- cuda-sanitizer-api
310-
- gmock
311-
- gtest
312310
test_cpp_cuopt:
313311
common:
314312
- output_types: [conda]

0 commit comments

Comments
 (0)