Skip to content

Commit

Permalink
windows-cmake: optional opencl test
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Hirsch <michael@scivision.dev>
  • Loading branch information
scivision committed Nov 7, 2021
1 parent ab3fa0f commit 66722aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/hwloc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@ 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 66722aa

Please sign in to comment.