[Cmake-commits] CMake branch, next, updated. v3.6.1-1239-g4f29b32
Brad King
brad.king at kitware.com
Fri Aug 12 09:35:24 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 4f29b3241f92887edc055c98b033953d2adea973 (commit)
via 1aa5c1bec82537ccbff8e05ae989b8befbdd286e (commit)
via aab1f6e984e81f732ec2dd5c33ff8f7bf604a0f2 (commit)
from 7dbdc8675b1235e2f416c05dbb9b00f07c956ade (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f29b3241f92887edc055c98b033953d2adea973
commit 4f29b3241f92887edc055c98b033953d2adea973
Merge: 7dbdc86 1aa5c1b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Aug 12 09:35:21 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Aug 12 09:35:21 2016 -0400
Merge topic 'FindCUDA-fixes' into next
1aa5c1be FindCUDA: Fix missing librt on Linux when using static cuda runtime.
aab1f6e9 FindCUDA: Restore default behavior of CUDA_USE_STATIC_CUDA_RUNTIME
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1aa5c1bec82537ccbff8e05ae989b8befbdd286e
commit 1aa5c1bec82537ccbff8e05ae989b8befbdd286e
Author: Stephen Sorley <Stephen.Sorley at jhuapl.edu>
AuthorDate: Thu Aug 11 15:54:28 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Aug 12 09:28:38 2016 -0400
FindCUDA: Fix missing librt on Linux when using static cuda runtime.
Commit 7229ae72 (FindCUDA: Refactor Android(Tegra) support, 2016-04-19)
changed the logic to only add librt to the link line for CUDA versions
6.5 and older. However, newer versions of CUDA still require librt.
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 972068b..78b716d 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -818,12 +818,13 @@ if(CUDA_USE_STATIC_CUDA_RUNTIME)
else()
unset(CMAKE_THREAD_PREFER_PTHREAD)
endif()
- endif()
- 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)
- message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.")
+
+ if(NOT APPLE)
+ #On Linux, you must link against librt when using the static cuda runtime.
+ find_library(CUDA_rt_LIBRARY rt)
+ if (NOT CUDA_rt_LIBRARY)
+ message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.")
+ endif()
endif()
endif()
endif()
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aab1f6e984e81f732ec2dd5c33ff8f7bf604a0f2
commit aab1f6e984e81f732ec2dd5c33ff8f7bf604a0f2
Author: Stephen Sorley <Stephen.Sorley at jhuapl.edu>
AuthorDate: Thu Aug 11 15:20:17 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Aug 12 09:26:30 2016 -0400
FindCUDA: Restore default behavior of CUDA_USE_STATIC_CUDA_RUNTIME
Fix bug introduced by commit 7229ae72 (FindCUDA: Refactor Android(Tegra)
support, 2016-04-19). `CUDA_USE_STATIC_CUDA_RUNTIME` should be enabled
by default if `cudart_static` is available, and silently disabled if
it is not.
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d7c9d8a..972068b 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -779,18 +779,19 @@ if(CUDA_VERSION VERSION_EQUAL "3.0")
)
endif()
-if(CUDA_USE_STATIC_CUDA_RUNTIME AND NOT CUDA_VERSION VERSION_LESS "5.5")
+if(NOT CUDA_VERSION VERSION_LESS "5.5")
cuda_find_library_local_first(CUDA_cudart_static_LIBRARY cudart_static "static CUDA runtime library")
mark_as_advanced(CUDA_cudart_static_LIBRARY)
endif()
if(CUDA_cudart_static_LIBRARY)
- # Set whether to use the static cuda runtime.
+ # If static cudart available, use it by default, but provide a user-visible option to disable it.
option(CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" ON)
set(CUDA_CUDART_LIBRARY_VAR CUDA_cudart_static_LIBRARY)
else()
- option(CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" OFF)
+ # If not available, silently disable the option.
+ set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "")
set(CUDA_CUDART_LIBRARY_VAR CUDA_CUDART_LIBRARY)
endif()
-----------------------------------------------------------------------
Summary of changes:
Modules/FindCUDA.cmake | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list