Skip to content

Commit

Permalink
add opencl test
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Hirsch <scivision@users.noreply.github.com>
  • Loading branch information
scivision committed Nov 4, 2021
1 parent fb123e4 commit ae55354
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/hwloc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ endforeach()
target_compile_definitions(hwloc_type_sscanf PRIVATE XMLTESTDIR=\"${CMAKE_CURRENT_SOURCE_DIR}/xml/\")

set_tests_properties(get_obj_with_same_locality PROPERTIES ENVIRONMENT HWLOC_TOP_SRCDIR=${TOPDIR})

# --- optional tests

find_package(OpenCL)
if(OpenCL_FOUND)
add_executable(test_opencl opencl.c)
target_link_libraries(test_opencl PRIVATE hwloc::hwloc OpenCL::OpenCL)

add_test(NAME OpenCL COMMAND test_opencl)
set_tests_properties(OpenCL PROPERTIES TIMEOUT 10)
endif()

0 comments on commit ae55354

Please sign in to comment.