Skip to content

Commit

Permalink
Disabling curl tests doesn't now disable kvikio cpp tests (#503)
Browse files Browse the repository at this point in the history
Works around curl/curl#15351 . We cache the `BUILD_TESTING` cache variable when it exists so that our tests are enabled when building curl from source.

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Tianyu Liu (https://github.com/kingcrimsontianyu)
  - Bradley Dice (https://github.com/bdice)

URL: #503
  • Loading branch information
robertmaynard authored Oct 21, 2024
1 parent f2a0567 commit 36c5c27
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cpp/cmake/thirdparty/get_libcurl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
function(find_and_configure_libcurl)
include(${rapids-cmake-dir}/cpm/find.cmake)

# Work around https://github.com/curl/curl/issues/15351
if(DEFINED CACHE{BUILD_TESTING})
set(CACHE_HAS_BUILD_TESTING $CACHE{BUILD_TESTING})
endif()

rapids_cpm_find(
CURL 7.87.0
GLOBAL_TARGETS libcurl
Expand All @@ -27,6 +32,14 @@ function(find_and_configure_libcurl)
OPTIONS "BUILD_CURL_EXE OFF" "BUILD_SHARED_LIBS OFF" "BUILD_TESTING OFF" "CURL_USE_LIBPSL OFF"
"CURL_DISABLE_LDAP ON" "CMAKE_POSITION_INDEPENDENT_CODE ON"
)
if(DEFINED CACHE_HAS_BUILD_TESTING)
set(BUILD_TESTING
${CACHE_HAS_BUILD_TESTING}
CACHE BOOL "" FORCE
)
else()
unset(BUILD_TESTING CACHE)
endif()
endfunction()

find_and_configure_libcurl()

0 comments on commit 36c5c27

Please sign in to comment.