[cmake-developers] [CMake 0016096]: FindCUDA requires dynamic runtime even if building statically

2016-05-06 Thread Mantis Bug Tracker

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 ModifiedUsername   FieldChange   
== 
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


Re: [cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour

2016-05-06 Thread Rolf Eike Beer
Am Freitag, 6. Mai 2016, 17:09:14 schrieb Harry Mallon:
> According to Fedora documentation the "Release:" variable in RPM files
> should be set to 1%{?dist}.
> https://fedoraproject.org/wiki/How_to_create_an_RPM_package
> https://fedoraproject.org/wiki/Packaging:DistTag
> 
> This means it should be set to a string which looks like "1.el7.centos" on
> my CentOS7 machine. CPack sets this to "1" by default, but can be changed
> with the CPACK_RPM_PACKAGE_RELEASE variable. I propose a change as follows:
> https://github.com/hm1992/CMake/commit/94c611d5710a51072e15855ed96a225def97
> 5c38
> 
> * Adds CPACK_RPM_DIST which defaults to the output of "rpmbuild -E %{dist}
> 2>/dev/null". * Makes CPACK_RPM_PACKAGE_RELEASE default to
> "1${CPACK_RPM_DIST}"

Instead of "2>/dev/null" you should use the ERROR_QUIET option.

Eike

signature.asc
Description: This is a digitally signed message part.
-- 

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

[cmake-developers] Make CPACK_RPM_PACKAGE_RELEASE match Fedora/RHOS/CentOS recommended behaviour

2016-05-06 Thread Harry Mallon
According to Fedora documentation the "Release:" variable in RPM files should 
be set to 1%{?dist}.
https://fedoraproject.org/wiki/How_to_create_an_RPM_package
https://fedoraproject.org/wiki/Packaging:DistTag

This means it should be set to a string which looks like "1.el7.centos" on my 
CentOS7 machine. CPack sets this to "1" by default, but can be changed with the 
CPACK_RPM_PACKAGE_RELEASE variable. I propose a change as follows:
https://github.com/hm1992/CMake/commit/94c611d5710a51072e15855ed96a225def975c38

* Adds CPACK_RPM_DIST which defaults to the output of "rpmbuild -E %{dist} 
2>/dev/null".
* Makes CPACK_RPM_PACKAGE_RELEASE default to "1${CPACK_RPM_DIST}"

I think I am right in saying this would not change behaviour on distributions 
that did not use the %{dist} option as "rpmbuild -E %{dist}" should return 
nothing.

Harry

Harry Mallon

CODEX | Software Engineer

60 Poland Street | London | England | W1F 7NT

E ha...@codexdigital.com | T +44 203 7000 
989

Website | Facebook 
| Twitter

[http://www.codexdigital.com/?action=asset=E55D8A6F-AF62-4978-8FF1-435A85AFADBF]
-- 

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