Skip to content

Commit

Permalink
Update rmm tests to use rapids_cmake_support_conda_env (#1707)
Browse files Browse the repository at this point in the history
Fixes issue brought up in rapidsai/rapids-cmake#634 (comment) where rmm wasn't using rapids_cmake_support_conda_env

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

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Mark Harris (https://github.com/harrism)

URL: #1707
  • Loading branch information
robertmaynard authored Oct 22, 2024
1 parent 50e60a8 commit 1024a12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ option(CODE_COVERAGE "Enable generating code coverage with gcov." OFF)
include(rapids-test)
rapids_test_init()

# Ensure tests are using the conda env, so they have the correct release/debug compile flags
rapids_cmake_support_conda_env(conda_env)

# This function takes in a test name and test source and handles setting all of the associated
# properties and linking to build the test
function(ConfigureTestInternal TEST_NAME)
add_executable(${TEST_NAME} ${ARGN})
target_include_directories(${TEST_NAME} PRIVATE "$<BUILD_INTERFACE:${RMM_SOURCE_DIR}>")
target_link_libraries(${TEST_NAME} GTest::gmock GTest::gtest GTest::gmock_main GTest::gtest_main
pthread rmm)
pthread rmm $<TARGET_NAME_IF_EXISTS:conda_env>)
set_target_properties(
${TEST_NAME}
PROPERTIES POSITION_INDEPENDENT_CODE ON
Expand All @@ -40,7 +43,6 @@ function(ConfigureTestInternal TEST_NAME)
PUBLIC "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM_LOGGING_LEVEL}")
target_compile_options(${TEST_NAME} PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall -Werror
-Wno-error=deprecated-declarations>)
target_compile_options(${TEST_NAME} PUBLIC "$<$<CONFIG:Debug>:-O0>")

if(DISABLE_DEPRECATION_WARNING)
target_compile_options(
Expand Down

0 comments on commit 1024a12

Please sign in to comment.