| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Introduce the CUDA_COMPILER_ID and CUDA_COMPILER_VERSION generator
expressions.
|
|
|
|
|
| |
Make them match what `ADD_TEST_MACRO` gives to ctest as the
project name to build so that the `.sln` file will be found.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| | |
46abfedb CUDA: MSVC will now state files are cuda files when needed
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1658
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
CUDA 9 dropped support for `compute_20`, so use a different alternative.
|
|\
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
Use the `BUILD_RPATH` property and reference the CMake-computed location
of the runtime libraries.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Append to `CMAKE_CUDA_FLAGS` instead of overwriting it.
|
| |
|
| |
|
| |
|
|
|