summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
Commit message (Collapse)AuthorAgeFilesLines
* FindCUDA: Add support for clcacheEdward Z. Yang2018-04-061-0/+5
| | | | | | | When `CMAKE_C_COMPILER` is `clcache`, pass plain `cl` as the host compiler to `nvcc`. Otherwise, `nvcc` does not accept it. Signed-off-by: Edward Z. Yang <ezyang@fb.com>
* FindCUDA: Make nvcc configurable via CUDA_NVCC_EXECUTABLE env varEdward Z. Yang2018-03-291-10/+14
| | | | | | | | | | This is useful if, for example, you want ccache to be used for nvcc. With the current behavior, cmake always picks up /usr/local/cuda/bin/nvcc, even if there is a ccache nvcc stub in the PATH. Allowing for CUDA_NVCC_EXECUTABLE lets us work around the problem. Signed-off-by: Edward Z. Yang <ezyang@fb.com>
* MAINT: Misc. typosluz.paz2018-02-131-5/+5
| | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt`.
* FindCUDA: Fix regression in per-config flagsBrad King2018-01-301-0/+12
| | | | | | | | | Changes in commit 48f7e2d300 (Unhardcode the CMAKE_CONFIGURATION_TYPES values, 2017-11-27) accidentally left `CUDA_configuration_types` undefined, but this is used in a few places to handle per-config flags. Restore it. Fixes: #17671
* MAINT: Misc. typosluz.paz2018-01-101-1/+1
| | | Found via `codespell`
* Merge topic 'unhardcode-configuration-types'Brad King2018-01-101-18/+1
|\ | | | | | | | | | | | | | | 1f4d7a07 Help: Add references and backticks in LINK_FLAGS prop_tgt 48f7e2d3 Unhardcode the CMAKE_CONFIGURATION_TYPES values Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1345
| * Unhardcode the CMAKE_CONFIGURATION_TYPES valuesBeren Minor2018-01-081-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | This removes duplicated code for per-config variable initialization by providing a `cmake_initialize_per_config_variable(<PREFIX> <DOCSTRING>)` function. This function initializes a `<PREFIX>` cache variable from `<PREFIX>_INIT` and unless the `CMAKE_NOT_USING_CONFIG_FLAGS` variable is defined, does the same with `<PREFIX>_<CONFIG>` from `<PREFIX>_<CONFIG>_INIT` for every `<CONFIG>` in `CMAKE_CONFIGURATION_TYPES` for multi-config generators or `CMAKE_BUILD_TYPE` for single-config generators.
* | Merge topic 'FindCUDA-deduplicate-c+std-host-flags'Brad King2018-01-091-1/+1
|\ \ | | | | | | | | | | | | | | | | | | ff41a4b8 FindCUDA: de-duplicates C++11 flag when propagating host flags. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1628
| * | FindCUDA: de-duplicates C++11 flag when propagating host flags.David Hirvonen2018-01-061-1/+1
| | |
* | | Merge topic 'msvc2017-findcuda'Brad King2018-01-091-8/+15
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | fab1b432 FindCUDA: Update to properly find MSVC 2017 compiler tools Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !1631
| * | FindCUDA: Update to properly find MSVC 2017 compiler toolsAaron Bray2018-01-081-8/+15
| |/ | | | | | | | | An implementation that handles the different installation locations of visual studio compiler tools
* | Merge topic 'use_generator_is_multi_config'Brad King2018-01-081-6/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | 3c413e2a GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules c267ea1c GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1627
| * | GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in ModulesCraig Scott2017-12-291-6/+9
| |/
* | Various typo fixesLuz Paz2018-01-031-1/+1
|/ | | | Some are user-facing. Others are source comments.
* Merge topic 'findcuda-separable-compilation-fix'Brad King2017-11-301-2/+2
|\ | | | | | | | | | | | | | | 3726ded1 FindCUDA: Add cublas device library to separable compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !1446
| * FindCUDA: Add cublas device library to separable compilationJamil Appa2017-11-291-2/+2
| | | | | | | | | | Add cublas libraries to separable compilation device link line to resolve missing symbols when using cublas device library.
* | Modules: Replace coded PATHS with PATH_SUFFIXESChristian Pfeiffer2017-11-201-2/+1
| | | | | | | | | | | | | | Some modules assume that `/usr` and `/usr/local` are the only `CMAKE_PREFIX_PATH` entries and explicitly enumerate all paths instead of using `PATH_SUFFIXES` and relying on the dynamic set of prefix paths. This commit attempts to rectify that behavior.
* | Fix trivial typos in textluzpaz2017-11-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* FindCUDA: Improve documentation formatting markupHenry Schreiner2017-10-231-18/+19
|
* FindCUDA: Update for CUDA 9 breakup of nppi into multiple librariesRobert Maynard2017-10-061-1/+39
| | | | Fixes: #17310
* Merge topic 'FindCUDA-superseded'Brad King2017-08-111-0/+14
|\ | | | | | | | | | | | | ae813b6b FindCUDA: Document that module has been superseded Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1124
| * FindCUDA: Document that module has been supersededBrad King2017-08-101-0/+14
| | | | | | | | | | Add a note at the top of the module documentation to point readers at the first-class support for the CUDA language.
* | FindCUDA: Always obey the CUDA_USE_STATIC_CUDA_RUNTIME option.Robert Maynard2017-08-101-2/+6
|/ | | | | Fixes #17150, where the FindCUDA would incorrectly handle CUDA_USE_STATIC_CUDA_RUNTIME being set to false.
* Merge topic 'FindCUDA-no-empty-genex'Brad King2017-06-271-0/+2
|\ | | | | | | | | | | | | a3e442bb FindCUDA: Fix CUDA_NVCC_FLAGS_<CONFIG> for separable compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1008
| * FindCUDA: Fix CUDA_NVCC_FLAGS_<CONFIG> for separable compilationRobert Maynard2017-06-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.0.0-rc6~3^2 (FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation, 2014-05-18), using the feature for one configuration results in empty-string ("") arguments on the command line for other configurations. This is because the generator expression for a non-matching configuration evaluates to an empty string but does not remove the argument. Use `COMMAND_EXPAND_LISTS` to remove the empty arguments from the custom command after genex evaluation. Fixes: #16411
* | FindCUDA: Use find_program if find_host_program is not availableMaxime Roussin-BĂ©langer2017-06-261-1/+5
|/ | | | | | | | | CMake does not define the `find_host_program` command we've been using in the cross-compiling code path. It was provided by a widely used Android toolchain file. For compatibility, continue to use `find_host_program` if available, but otherwise use just `find_program`. Fixes: #16509
* Use string(APPEND) in ModulesDaniel Pfeifer2017-05-171-1/+1
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_\$\{\}]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* FindCUDA: Add option to use modern form of target_link_librariesTaylor Braun-Jones2017-04-041-7/+14
| | | | | | | | This adds the option CUDA_LINK_LIBRARIES_KEYWORD which can be set to PRIVATE, PUBLIC, or INTERFACE or left empty (the default) to use the old form of target_link_libraries internally in FindCUDA macros. Fixes: #16772
* Merge topic 'cuda_use_cudadevrt_with_separable_compilation'Brad King2016-09-201-0/+13
|\ | | | | | | | | 891e0ebd FindCUDA: find cudadevrt and link it if CUDA_SEPARABLE_COMPILATION is ON
| * FindCUDA: find cudadevrt and link it if CUDA_SEPARABLE_COMPILATION is ONRobert Maynard2016-09-201-0/+13
| | | | | | | | | | Issue: #15157 Patch-by: l0calh05t on gitlab.kitware.com
* | FindCUDA: Allow cuda_compile* macros to be called more than once per directoryStephen Sorley2016-08-311-2/+13
| | | | | | | | | | | | | | Added a counter as a directory property that gets incremented every time one of the cuda_compile* macros is called. The value of this counter is then added to the phony target name passed to CUDA_WRAP_SRCS. This ensures that every call to one of these macros has its own unique intermediate output directory.
* | FindCUDA: Fix for broken cuda_compile* commands.Stephen Sorley2016-08-311-9/+32
|/ | | | | | | | | | | | | | The macros CUDA_COMPILE, CUDA_COMPILE_PTX, CUDA_COMPILE_FATBIN, and CUDA_COMPILE_CUBIN were broken by commit 7ded655 (FindCUDA: Take NVCC include directories from target properties, 2016-08-16). This bug is due to the fact that all of these macros call CUDA_WRAP_SRCS with a target name that's not an actual target, causing the new generator expressions to fail. Fix the bug by changing these macros to pass "PHONY" to CUDA_WRAP_SRCS. Now, when CUDA_WRAP_SRCS sees "PHONY", it falls back to the old behavior of populating the include directories and compile definitions from directory properties, instead of using target generator expressions.
* FindCUDA: Take NVCC include directories from target propertiesPeter Boettcher2016-08-161-21/+11
| | | | | | | | Fixes issue where include directories specified on the target are not passed on to NVCC. This includes both target_include_directories() as well as include directories added by dependency chaining. Closes: #14201
* FindCUDA: Fix missing librt on Linux when using static cuda runtime.Stephen Sorley2016-08-121-6/+7
| | | | | | 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.
* FindCUDA: Restore default behavior of CUDA_USE_STATIC_CUDA_RUNTIMEStephen Sorley2016-08-121-3/+4
| | | | | | | 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.
* Merge topic 'FindCUDA-no-windows-librt'Brad King2016-08-031-1/+1
|\ | | | | | | | | f4e979b1 FindCUDA: Do not look for librt on Windows
| * FindCUDA: Do not look for librt on WindowsStephen Sorley2016-08-021-1/+1
| | | | | | | | | | Otherwise an incorrect warning appears when compiling with CUDA SDK 6.5 or older and CUDA_USE_STATIC_CUDA_RUNTIME is true.
* | FindCUDA: Add search path for nvcc on ArchHans Gaiser2016-08-021-1/+2
|/
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-2/+2
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Fix typos.Felix Geyer2016-07-101-1/+1
|
* FindCUDA: Use the correct runtime in REQUIRED_VARS checkChuck Atkins2016-06-141-1/+3
| | | | | | | | | When enabling the CUDA static runtime, the current module always uses the shared runtime in the REQUIRED_VARS check. This change should select the correct runtime to be checked for as required based on the CUDA_USE_STATIC_CUDA_RUNTIME option. Fixes #16096
* FindCUDA: Refactor Android(Tegra) supportBoris Fomitchev2016-06-091-45/+87
| | | | Reviewed-by: James Bigler <jamesbigler@gmail.com>
* FindCUDA: Adjust vertical whitespaceBoris Fomitchev2016-06-091-3/+5
|
* FindCUDA: Add support for finding the cublas_device libraryJames Sharpe2016-05-251-2/+4
|
* FindCUDA: Add support for generator expressions in CUDA_NVCC_FLAGSChuck Atkins2016-05-251-2/+7
| | | | | | Follow the configure_file by a file(GENERATE) so the resulting cmake scripts used by FindCUDA for wrapping nvcc calls can now support generator expressions in the CUDA_NVCC_FLAGS variable.
* FindCUDA: Detect and report FP16 supportBoris Fomitchev2016-05-191-0/+7
| | | | Reviewed-by: James Bigler <jamesbigler@gmail.com>
* Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-291-2/+2
| | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* FindCUDA: Fix regression in separate compilation (#16027)Brad King2016-03-221-1/+6
| | | | | | | | Since commit v3.5.0-rc1~47^2 (FindCUDA: Support special characters in path, 2016-01-15) our add_custom_command calls use VERBATIM so that CMake will automatically quote special characters correctly. Fix the separate compilation code path to not add its own quoting when the VERBATIM option will be used.
* FindCUDA: Fix regression under Visual Studio generatorsBrad King2016-02-171-3/+13
| | | | | | | | | | | | | | | | | Since commit v3.5.0-rc1~47^2 (FindCUDA: Support special characters in path, 2016-01-15) our add_custom_command calls use VERBATIM so that CMake will automatically quote special characters correctly. However, this breaks the special `$(VCInstallDir)` placeholder used with Visual Studio generators. Since we do not support preservation of such placeholders with VERBATIM (see issue #15001) we must fall back to not using VERBATIM when the placeholder is used. A better fix would be to stop using `$(VCInstallDir)` and use the value of `CMAKE_${CUDA_C_OR_CXX}_COMPILER` instead, but that will require additional semantic and documentation changes. For now simply fix the regression with the above approach. Reported-by: Stephen Sorley <Stephen.Sorley@jhuapl.edu>
* FindCUDA: Support special characters in path (#15919)Brad King2016-01-151-0/+3
| | | | | | | | Add `VERBATIM` to all `add_custom_command` calls so that CMake will escape arguments properly even when special characters such as "()" are present. Suggested-by: Nils Gladitz <nilsgladitz@gmail.com>