summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/WithDefs
Commit message (Collapse)AuthorAgeFilesLines
* CUDA: Support compiler id and version generator expressionsRobert Maynard2019-03-112-0/+10
| | | | | Introduce the CUDA_COMPILER_ID and CUDA_COMPILER_VERSION generator expressions.
* Tests: Fix Cuda test project namesBrad King2018-10-101-1/+1
| | | | | Make them match what `ADD_TEST_MACRO` gives to ctest as the project name to build so that the `.sln` file will be found.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-14/+14
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Merge topic 'msvc_cuda_8_explicitly_specify_cuda_language'Brad King2018-01-182-9/+2
|\ | | | | | | | | | | | | 46abfedb CUDA: MSVC will now state files are cuda files when needed Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1658
| * CUDA: MSVC will now state files are cuda files when neededRobert Maynard2018-01-122-9/+2
| | | | | | | | | | | | | | | | The MSVC CUDA build customizations before CUDA 9 would not explicitly add the -x cu option when building. This caused .cpp and .c files invoked with CudaCompile to be compiled as host code and not cuda. Now when we detect CUDA < 9 we will explicitly add this option to correct this bug.
* | Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and XcodeBrad King2018-01-123-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `INCLUDE_DIRECTORIES` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of include directories for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Fixes: #17435
* | Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and XcodeBrad King2018-01-122-8/+22
|/ | | | | | | | | | | | | | | The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `COMPILE_DEFINITIONS` to match the selected language. This is not exactly the same as for other generators, but is the best VS and Xcode can do. It is also sufficient for many use cases since the set of definitions for C and C++ is frequently similar but may be distinct from those for other languages like CUDA. Issue: #17435
* Genex: Enable COMPILE_LANGUAGE for COMPILE_OPTIONS with Visual StudioBrad King2017-11-202-0/+14
| | | | | | | | | | | | | | | | | | | Since commit v3.9.0-rc4~3^2~1 (VS: Fix target_compile_options for CUDA, 2017-06-21), the evaluation of `COMPILE_LANGUAGE` receives the proper language. The set of compile flags used for a target's C and C++ sources is based on the linker language. By default this is always the C++ flags if any C++ sources appear in the target, and otherwise the C flags. Therefore we can define the `COMPILE_LANGUAGE` generator expression in `COMPILE_OPTIONS` to match the selected language. This is not exactly the same as for other generators, but is the best VS can do. It is also sufficient for many use cases since the set of allowed flags for C and C++ is almost the same in Visual Studio. Furthermore, since the VS generator moves many of the flags to declarative `.vcxproj` elements, it will automatically avoid passing C++ flags for C sources. Issue: #17435
* Tests: Fix CudaOnly.WithDefs test on CUDA 9Brad King2017-09-291-1/+5
| | | | CUDA 9 dropped support for `compute_20`, so use a different alternative.
* Merge topic 'vs-cuda-fix-flags'Brad King2017-06-222-0/+5
|\ | | | | | | | | | | | | | | 3b754215 VS: Improve workaround for CUDA -Xcompiler placement bug f2059585 VS: Fix target_compile_options for CUDA Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !996
| * VS: Fix target_compile_options for CUDABrad King2017-06-212-0/+5
| | | | | | | | | | | | | | | | | | Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA. The exclusion added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options to C compiler, 2017-03-07) was correct but we need additional logic to pass the CUDA compile options to the CUDA compiler. Also we should still pass the CXX or C options to MSVC (ClCompile) when those languages are enabled even if the link language is CUDA.
* | Tests: Simplify CUDA rpath on macOSBrad King2017-06-211-4/+3
|/ | | | | Use the `BUILD_RPATH` property and reference the CMake-computed location of the runtime libraries.
* CUDA: Work around VS limitation in CudaOnly.WithDefs testBrad King2017-03-102-2/+10
| | | | | | CUDA 8.0 MSBuild rules do not pass `-x cu` to nvcc and so cannot support a custom file extension. Fix our test for this to use a `.cu` extension instead.
* CUDA: Fix test cases to not override CUDA flagsBrad King2017-02-151-1/+1
| | | | Append to `CMAKE_CUDA_FLAGS` instead of overwriting it.
* Tests: Run clang-format on CUDA codeBrad King2017-02-141-17/+11
|
* CUDA: Port test cases to Windows with MSVC host compilerBrad King2017-01-122-1/+18
|
* CUDA: Tests now state why they are failing when no CUDA card is found.Robert Maynard2016-12-151-0/+1
|
* CUDA: Add tests to verify CUDA compiler works properly.Robert Maynard2016-11-142-0/+77