1if(NOT OPENMP_TEST_COMPILER_ID STREQUAL "Clang") 2 # Silently return, no need to annoy the user. 3 return() 4endif() 5 6set(deps omptarget-nvptx omptarget omp) 7if(LIBOMPTARGET_NVPTX_ENABLE_BCLIB) 8 set(deps ${deps} omptarget-nvptx-bc) 9endif() 10 11# Run with only one thread to only launch one application to the GPU at a time. 12add_openmp_testsuite(check-libomptarget-nvptx 13 "Running libomptarget-nvptx tests" ${CMAKE_CURRENT_BINARY_DIR} 14 EXCLUDE_FROM_CHECK_ALL 15 DEPENDS ${deps} ARGS -j1) 16 17set(LIBOMPTARGET_NVPTX_TEST_FLAGS "" CACHE STRING 18 "Extra compiler flags to send to the test compiler.") 19set(LIBOMPTARGET_NVPTX_TEST_OPENMP_FLAGS 20 "-fopenmp -fopenmp-targets=nvptx64-nvidia-cuda" CACHE STRING 21 "OpenMP compiler flags to use for testing libomptarget-nvptx.") 22 23# Configure the lit.site.cfg.in file 24set(AUTO_GEN_COMMENT "## Autogenerated by libomptarget-nvptx configuration.\n# Do not edit!") 25configure_file(lit.site.cfg.in lit.site.cfg @ONLY) 26