Skip to content

Commit

Permalink
Update rmm tests to use rapids_cmake_support_conda_env
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Oct 17, 2024
1 parent 50e60a8 commit cadafa5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ option(CODE_COVERAGE "Enable generating code coverage with gcov." OFF)
include(rapids-test)
rapids_test_init()

# Make sure tests are using the conda env, and properly
# getting 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 conda_env)
set_target_properties(
${TEST_NAME}
PROPERTIES POSITION_INDEPENDENT_CODE ON
Expand All @@ -40,7 +44,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 cadafa5

Please sign in to comment.