CUDA: Use MSVC default pattern for naming object files

The default that CUDA uses causes failures when you try to embed
CUDA obj's into another target.
This commit is contained in:
Robert Maynard
2018-01-18 16:05:59 -05:00
parent 142938225e
commit fa583869f7
7 changed files with 51 additions and 26 deletions
@@ -0,0 +1,2 @@
add_library(CudaConflicts OBJECT static.cu)
@@ -0,0 +1,17 @@
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
int __host__ cu2_sq_func(int x)
{
cudaError_t err;
int nDevices = 0;
err = cudaGetDeviceCount(&nDevices);
if (err != cudaSuccess) {
std::cerr << "nDevices: " << nDevices << std::endl;
std::cerr << "err: " << err << std::endl;
return 1;
}
return x * x;
}