17 Commits

Author SHA1 Message Date
Brad King
bff4651f2e CUDA: Do not create CMAKE_CUDA_HOST_COMPILER cache entry
Users can create it through an explicit command-line option if desired.

Initializing the variable as an empty cache entry can wipe out a normal
variable of the same name that may have been set by a toolchain file.
Since commit v3.8.0-rc1~261^2~11 (CUDA: Use the host compiler for
linking CUDA executables and shared libs, 2016-09-19) we save the value
of `CMAKE_CUDA_HOST_COMPILER` persistently in the compiler information
file as a normal variable.

Fixes: #17935
2018-04-24 10:09:36 -04:00
Brad King
eb80af9093 Drop Visual Studio 8 2005 generator
This generator has been deprecated since CMake 3.9.  Remove it.
2018-04-02 10:08:10 -04:00
Brad King
acb4cb9500 CMakeFindBinUtils: Improve switch between MSVC- and GNU-like tools
The switch was not considering some languages, such as `ASM`.
Instead of memorizing the list of languages in the condition,
use a language specified by the includer.

Fixes: #17510
2017-11-28 07:57:58 -05:00
Brad King
7914fb8223 CUDA: Fix default selection of host compiler used to drive linking
When no explicit `CMAKE_CUDA_HOST_COMPILER` is specified by the user
then we do not pass `-ccbin` to `nvcc`.  In this case, nvcc's link line
we extract during the compiler identification step may not have the
absolute path to the host compiler it uses to drive linking.  If it is
not absolute, use the `PATH=` from nvcc's output to search for it since
that is the one `nvcc` would use.

This fixes our internal `CMAKE_CUDA_HOST_LINK_LAUNCHER` value used to
construct link lines when using `CUDA` as the linker language.  It needs
to match the host compiler `nvcc` uses internally during compilation.

Fixes: #17323
2017-10-04 10:25:47 -04:00
Brad King
c94f1bcf92 Drop Visual Studio 7 .NET 2003 generator
This generator has been deprecated since CMake 3.6.  Remove it.
2017-04-19 15:28:05 -04:00
Brad King
82521e359f VS: Add support for determining CUDA compiler id
Teach `CMakeDetermineCompilerId` how to generate a vcxproj file using
the `CMAKE_VS_PLATFORM_TOOLSET_CUDA`.
2017-03-10 10:19:55 -05:00
Brad King
7c29a0c860 CMakeDetermineCUDACompiler: Drop out-of-date comment 2017-02-14 13:40:20 -05:00
Robert Maynard
44f3acb202 CUDA: Detect the toolkit include directories
The `nvcc -v` output provides what include directories need to be added
to use the CUDA toolkit from other languages ( C/C++ ).
2017-02-10 16:08:06 -05:00
Brad King
5365421e84 CUDA: Detect implicit link information on Windows
The `nvcc -v` output on Windows uses response files, so load the one we
need to extract the full link line.
2017-01-12 10:39:03 -05:00
Brad King
522b913f43 CUDA: Find MSVC binutils on Windows
On Windows the host link launcher is just `link.exe`.  Find and use that
instead of trying to extract the launcher from the `nvcc -v` output.
2017-01-12 10:39:03 -05:00
Brad King
a2e80cb085 CUDA: Detect MSVC architecture id 2017-01-12 10:39:02 -05:00
Brad King
e3f404fe29 CUDA: Implement nvcc implicit link line extraction more robustly
Do not assume that the implicit link line is the last line of the output
from `nvcc -v`.  Instead first find the `LIBRARIES=` line, and then look
for that content on a later line.  It appears twice.  First on a call to
`nvlink`, which we ignore.  Later it appears on the implicit link line.
Extract the latter line.  On failure, abort with a `FATAL_ERROR` so that
the user does not try to build without proper link information.

Once we have the line, parse it with `separate_arguments` using the
`UNIX_COMMAND` option just like `CMakeParseImplicitLinkInfo` already
does.  This robustly parses the command line and removes quoting.
Then extract the first argument as the host link launcher.
2016-12-13 11:01:40 -05:00
Robert Maynard
9cf5b98d54 CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX. 2016-11-14 16:40:49 -05:00
Robert Maynard
489c52ce68 CUDA: Use the host compiler for linking CUDA executables and shared libs. 2016-11-14 11:36:44 -05:00
Robert Maynard
bbaf243410 CUDA: add support for specifying an explicit host compiler. 2016-11-14 11:36:44 -05:00
Robert Maynard
4f5155f6ab CUDA: We now properly perform CUDA compiler identification. 2016-11-14 11:36:43 -05:00
Robert Maynard
f8aac21947 CUDA: Add basic CUDA language support for *NIX systems. 2016-11-14 11:36:42 -05:00