mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user