summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCUDACompiler.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* CUDA, CXX, OBJCXX: C++23 support with Clang 12Raul Tambre2020-12-081-0/+1
| | | | | Clang 12 landed initial support for C++23 language mode flag -std={c|gnu}++2b in commit 6627a3c2873fdf7ccba1a1573371079be48b36e8.
* CMakeDetermineCompilerABI: Detect byte order as part of checkBrad King2020-11-041-0/+1
| | | | | | | We already detect `sizeof(void*)`. Detect the byte order as part of the same check. Issue: #21392
* CUDA: Clang separable compilationRaul Tambre2020-09-241-0/+3
| | | | | | | | | | | | For NVCC the compiler takes care of device linking when passed the "-dlink" flag. Clang doesn't support such magic and requires the buildsystem to do the work that NVCC does behind the scenes. The implementation is based on Bazel's device linking documentation: https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259 Closes: #20726
* CUDA: Determine CUDA toolkit location for NVCCRaul Tambre2020-06-121-0/+3
| | | | | Similar to how we already do for Clang. Avoids a lot of redundant work in FindCUDAToolkit.
* Merge branch 'backport-cuda-default-runtime' into cuda-default-runtimeBrad King2020-05-221-0/+2
|\
| * CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchainRobert Maynard2020-05-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library selection flags by default. To maintain backwards compatibility the default CUDA runtime library needs to be computed based on what libraries are found on the initial compiler invocation. For example a toolchain could establish initial flags that have all CUDA compilations using the runtime version, and if we don't detect this we will try to link to both the static and shared runtime. Co-Author: Brad King <brad.king@kitware.com> Fixes: #20708
* | Compilers: Add paths from -print-sysroot to system prefix pathRobert Maynard2020-04-141-0/+1
| |
* | MSVC: Use 'lib' instead of 'link /lib' to create static librariesFrancisco Facioni2020-03-031-0/+1
|/ | | | | | `link.exe /lib` is an undocumented flag and it just calls `lib.exe`. Also `link.exe` doesn't parse the `/lib` option correctly when in a response file.
* CUDA: Persist SIZEOF_VOID_P and PLATFORM_ABIRobert Maynard2019-12-161-0/+13
| | | | | | | The CUDA language failed to persist CMAKE_SIZEOF_VOID_P and CMAKE_INTERNAL_PLATFORM_ABI, causing find_ calls to fail when the only enabled language was CUDA. This specifically occurred when having to locate libraries inside `lib64` directories.
* CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-101-0/+7
|
* CUDA: persist CMAKE_LIBRARY_ARCHITECTURE and CUDA versionRobert Maynard2019-11-261-0/+5
| | | | | | The CUDA language failed to persist CMAKE_CUDA_LIBRARY_ARCHITECTURE and CMAKE_LIBRARY_ARCHITECTURE, causing find_ calls to fail when the only enabled language was CUDA.
* Compute implicit include directories from compiler outputChuck Cranor2019-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CMakeParseImplicitIncludeInfo.cmake: new parser that extracts the compiler's include path from verbose output. If the parser cannot parse the output, we fall back to the old behavior. On osx we skip over framework directories (handled elsewhere). - CMakeDetermineCompilerABI.cmake: - use verbose flag in try_compile for ${src} - use new cmake_parse_implicit_include_info() to attempt extract implicit include directory path and if successful set CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES - CMakeCCompiler.cmake.in and CMakeCXXCompiler.cmake.in - preserve CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES value between runs in the same way CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES is preserved - Tests/RunCMake/ParseImplicitIncludeInfo: tests for parse based on the older Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in. The test runs a set of verbose compiler outputs collected from various machines through the parser and checks the results. New compiler files can be added by dropping input/output files in the ParseImplicitIncludeInfo/data subdirectory and then adding the new set of files to the ${targets} list in ParseImplicitIncludeInfo.cmake. There is a helper CMakeLists.txt in ParseImplicitIncludeInfo/data that can help with the generation of test input files. NOTE: the standard cmake pre-commit hook rejects verbose compiler output with trailing spaces... you have to manually edit them out. This shouldn't impact the test. Note that both the parser and the test code can use CMAKE_${LANG}_COMPILER_* variables such as ${CMAKE_CXX_COMPILER_ID} to decide how to parse verbose compiler output. For the test code, this requires us to save the variables values in the test input files. Fixes: #16291
* MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe}Mateusz Zych2018-10-291-0/+1
| | | | | | | | | | | | CMake commands vs_link_dll and vs_link_exe, performing linking on MSVC, are responsible for calling resource compiler and manifest tool. Before this commit, both of these tools were called directly, with the expectation that they are available in the `PATH`. This has been fixed by respecting CMake variables `CMAKE_RC_COMPILER` and `CMAKE_MT` defining paths to these tools. Fixes: #17804
* CUDA: Find CMAKE_LINKER on WindowsBrad King2018-10-291-0/+2
| | | | | We use this in `Modules/Platform/Windows-NVIDIA-CUDA.cmake`, so make sure it is available.
* CUDA: Set CMAKE_CUDA_COMPILER_LOADED variable when language is enabledHenry Schreiner2018-04-131-0/+1
| | | | We already do this for C, CXX, Fortran, etc.
* CUDA: Detect the toolkit include directoriesRobert Maynard2017-02-101-0/+2
| | | | | The `nvcc -v` output provides what include directories need to be added to use the CUDA toolkit from other languages ( C/C++ ).
* CUDA: set linker preference between C and C++Robert Maynard2017-01-241-1/+1
|
* CUDA: Now pass correct FLAGS when device link cuda executables.Robert Maynard2017-01-121-0/+2
| | | | | | | | Previously we had a two issues when building cuda executables that required separable compilation. The first was that we didn't propagate FLAGS causing any -arch / -gencode flags to be dropped, and secondly generators such as ninja would use the CXX language flags instead of CUDA when the executable was mixed language.
* CUDA: Detect MSVC architecture idBrad King2017-01-121-0/+1
|
* CUDA: Detect use of MSVC host compilerBrad King2017-01-121-0/+2
| | | | Report it in `CMAKE_CUDA_SIMULATE_{ID,VERSION}`.
* CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX.Robert Maynard2016-11-141-0/+1
|
* CUDA: Use the host compiler for linking CUDA executables and shared libs.Robert Maynard2016-11-141-0/+6
|
* CUDA: We now properly perform CUDA compiler identification.Robert Maynard2016-11-141-0/+5
|
* CUDA: Add support language levels (98/11)Robert Maynard2016-11-141-0/+1
|
* CUDA: Add basic CUDA language support for *NIX systems.Robert Maynard2016-11-141-0/+7