The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=16096 
====================================================================== 
Reported By:                Ryan Desmond
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16096
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-05-06 15:03 EDT
Last Modified:              2016-05-06 15:03 EDT
====================================================================== 
Summary:                    FindCUDA requires dynamic runtime even if building
statically
Description: 
In
https://gitlab.kitware.com/cmake/cmake/commit/7fea2b77df2d70283f4918a8ff52836dbc68db6b,
support was added to use the static CUDA libraries.  The script still checks for
and requires that the dynamic libraries are installed in order to build
successfully, though they are not needed for a static build.

Steps to Reproduce: 
 - Setup a machine on which to use build CUDA, which has the static libraries
available
 - Remove or delete cudart.so
 - Create a cmake script with `find_package(CUDA REQUIRED)`
 - When run, the script will fail with:

CMake Error at
/usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
(message):
  Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found version "7.5")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
(_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.5/Modules/FindCUDA.cmake:949
(find_package_handle_standard_args)
  imagery/CMakeLists.txt:43 (find_package)


Additional Information: 

The dynamic library is located at:

 725 cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\"
library")

The static library is located at:

 734   cuda_find_library_local_first(CUDA_cudart_static_LIBRARY cudart_static
"static CUDA runtime library")

Later in the script, the variable for the dynamic library is required, even if
the library itself is not required for a successful build.

 950 find_package_handle_standard_args(CUDA
 951   REQUIRED_VARS
 952     CUDA_TOOLKIT_ROOT_DIR
 953     CUDA_NVCC_EXECUTABLE
 954     CUDA_INCLUDE_DIRS
 955     CUDA_CUDART_LIBRARY
 956   VERSION_VAR
 957     CUDA_VERSION
 958   )
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-05-06 15:03 Ryan Desmond   New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to