diff --git a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake --- a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake +++ b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake @@ -38,7 +38,8 @@ if(try_compile_result) foreach(regex IN LISTS failed_regexes) - if("${OUTPUT}" MATCHES ${regex}) + # Ignore the warning about the newer or unknown CUDA version. + if(("${OUTPUT}" MATCHES ${regex}) AND NOT ("${OUTPUT}" MATCHES "Unknown CUDA version")) set(retval FALSE) endif() endforeach()