Skip to content
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

Hide all gtest symbols in cudftestutil #16546

11 changes: 11 additions & 0 deletions cpp/cmake/thirdparty/get_gtest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,20 @@
function(find_and_configure_gtest)
include(${rapids-cmake-dir}/cpm/gtest.cmake)

# Mark all the non explicit googletest symbols as hidden
# This ensures that libcudftestutil can be used by consumers with a different
# shared gtest
set(gtest_hide_internal_symbols ON)

# Find or install GoogleTest
rapids_cpm_gtest(BUILD_STATIC)

# Mark all the explicit googletest symbols as hidden
# This ensures that libcudftestutil can be used by consumers with a different
# shared gtest
if(TARGET gtest)
target_compile_definitions(gtest PUBLIC "$<BUILD_LOCAL_INTERFACE:GTEST_API_=>")
endif()
endfunction()

find_and_configure_gtest()
Loading