瀏覽代碼

FindCUDA: Do not look for librt on Windows

Otherwise an incorrect warning appears when compiling with CUDA SDK 6.5
or older and CUDA_USE_STATIC_CUDA_RUNTIME is true.
Stephen Sorley 9 年之前
父節點
當前提交
f4e979b126
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Modules/FindCUDA.cmake

+ 1 - 1
Modules/FindCUDA.cmake

@@ -817,7 +817,7 @@ if(CUDA_USE_STATIC_CUDA_RUNTIME)
       unset(CMAKE_THREAD_PREFER_PTHREAD)
     endif()
   endif()
-  if (NOT APPLE AND CUDA_VERSION VERSION_LESS "7.0")
+  if (UNIX AND NOT APPLE AND CUDA_VERSION VERSION_LESS "7.0")
     # Before CUDA 7.0, there was librt that has things such as, clock_gettime, shm_open, and shm_unlink.
     find_library(CUDA_rt_LIBRARY rt)
     if (NOT CUDA_rt_LIBRARY)