summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r--Tests/CudaOnly/DeviceLTO/file1.cu8
-rw-r--r--Tests/CudaOnly/DeviceLTO/main.cu8
-rw-r--r--Tests/CudaOnly/DontResolveDeviceSymbols/main.cu3
-rw-r--r--Tests/CudaOnly/EnableStandard/main.cu3
-rw-r--r--Tests/CudaOnly/ExportPTX/main.cu3
-rw-r--r--Tests/CudaOnly/SeparateCompilation/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file4.cu3
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file5.cu3
-rw-r--r--Tests/CudaOnly/SeparateCompilationTargetObjects/bar.cu3
-rw-r--r--Tests/CudaOnly/SeparateCompilationTargetObjects/foo.cu3
-rw-r--r--Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu3
-rw-r--r--Tests/CudaOnly/SharedRuntimePlusToolkit/nppif.cu1
-rw-r--r--Tests/CudaOnly/StaticRuntimePlusToolkit/nppif.cu1
-rw-r--r--Tests/CudaOnly/Toolkit/CMakeLists.txt8
14 files changed, 9 insertions, 43 deletions
diff --git a/Tests/CudaOnly/DeviceLTO/file1.cu b/Tests/CudaOnly/DeviceLTO/file1.cu
index 703927c..5ca000d 100644
--- a/Tests/CudaOnly/DeviceLTO/file1.cu
+++ b/Tests/CudaOnly/DeviceLTO/file1.cu
@@ -1,16 +1,10 @@
-#ifdef _WIN32
-# define EXPORT __declspec(dllexport)
-#else
-# define EXPORT
-#endif
-
extern __device__ int file2_func(int);
void __global__ kernel(int x)
{
file2_func(x);
}
-EXPORT int launch_kernel(int x)
+int launch_kernel(int x)
{
kernel<<<1, 1>>>(x);
return x;
diff --git a/Tests/CudaOnly/DeviceLTO/main.cu b/Tests/CudaOnly/DeviceLTO/main.cu
index 8ef4873..bb72471 100644
--- a/Tests/CudaOnly/DeviceLTO/main.cu
+++ b/Tests/CudaOnly/DeviceLTO/main.cu
@@ -2,13 +2,7 @@
#include "cuda.h"
-#ifdef _WIN32
-# define IMPORT __declspec(dllimport)
-#else
-# define IMPORT
-#endif
-
-IMPORT int launch_kernel(int x);
+int launch_kernel(int x);
int choose_cuda_device()
{
diff --git a/Tests/CudaOnly/DontResolveDeviceSymbols/main.cu b/Tests/CudaOnly/DontResolveDeviceSymbols/main.cu
index 84a7a19..d123e09 100644
--- a/Tests/CudaOnly/DontResolveDeviceSymbols/main.cu
+++ b/Tests/CudaOnly/DontResolveDeviceSymbols/main.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
int main(int argc, char** argv)
{
return 0;
diff --git a/Tests/CudaOnly/EnableStandard/main.cu b/Tests/CudaOnly/EnableStandard/main.cu
index 740c832..acbbee3 100644
--- a/Tests/CudaOnly/EnableStandard/main.cu
+++ b/Tests/CudaOnly/EnableStandard/main.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
#ifdef _WIN32
# define IMPORT __declspec(dllimport)
#else
diff --git a/Tests/CudaOnly/ExportPTX/main.cu b/Tests/CudaOnly/ExportPTX/main.cu
index 132377c..d2a9b90 100644
--- a/Tests/CudaOnly/ExportPTX/main.cu
+++ b/Tests/CudaOnly/ExportPTX/main.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
/*
Define GENERATED_HEADER macro to allow c++ files to include headers
generated based on different configuration types.
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
index ca73b1a..f2eb406 100644
--- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
+++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
@@ -20,7 +20,7 @@ set_target_properties(CUDASeparateLibA
POSITION_INDEPENDENT_CODE ON)
unset(CMAKE_CUDA_SEPARABLE_COMPILATION)
-if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
+if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
# Test adding a flag that is not in our CUDA flag table for VS.
if(NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 8)
string(APPEND CMAKE_CUDA_FLAGS " --ftemplate-depth 50")
diff --git a/Tests/CudaOnly/SeparateCompilation/file4.cu b/Tests/CudaOnly/SeparateCompilation/file4.cu
index cc24a46..f2ef8e7 100644
--- a/Tests/CudaOnly/SeparateCompilation/file4.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file4.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
#include "file1.h"
#include "file2.h"
diff --git a/Tests/CudaOnly/SeparateCompilation/file5.cu b/Tests/CudaOnly/SeparateCompilation/file5.cu
index 38cbeb2..9b2c92a 100644
--- a/Tests/CudaOnly/SeparateCompilation/file5.cu
+++ b/Tests/CudaOnly/SeparateCompilation/file5.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
#include "file1.h"
#include "file2.h"
diff --git a/Tests/CudaOnly/SeparateCompilationTargetObjects/bar.cu b/Tests/CudaOnly/SeparateCompilationTargetObjects/bar.cu
index 234586f..2e824ec 100644
--- a/Tests/CudaOnly/SeparateCompilationTargetObjects/bar.cu
+++ b/Tests/CudaOnly/SeparateCompilationTargetObjects/bar.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
#ifdef _WIN32
# define EXPORT __declspec(dllexport)
#else
diff --git a/Tests/CudaOnly/SeparateCompilationTargetObjects/foo.cu b/Tests/CudaOnly/SeparateCompilationTargetObjects/foo.cu
index 75c04af..88acaca 100644
--- a/Tests/CudaOnly/SeparateCompilationTargetObjects/foo.cu
+++ b/Tests/CudaOnly/SeparateCompilationTargetObjects/foo.cu
@@ -1,6 +1,3 @@
-
-#include <iostream>
-
#ifdef _WIN32
# define EXPORT __declspec(dllexport)
#else
diff --git a/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu b/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
index 78b10b1..367c488 100644
--- a/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
+++ b/Tests/CudaOnly/SeparateCompilationTargetObjects/main.cu
@@ -1,6 +1,3 @@
-// main.cu
-#include <iostream>
-
#ifdef _WIN32
# define IMPORT __declspec(dllimport)
#else
diff --git a/Tests/CudaOnly/SharedRuntimePlusToolkit/nppif.cu b/Tests/CudaOnly/SharedRuntimePlusToolkit/nppif.cu
index ac5341c..1e7350a 100644
--- a/Tests/CudaOnly/SharedRuntimePlusToolkit/nppif.cu
+++ b/Tests/CudaOnly/SharedRuntimePlusToolkit/nppif.cu
@@ -8,7 +8,6 @@
#endif
#include <cstdio>
-#include <iostream>
#include <assert.h>
#include <cuda_runtime_api.h>
diff --git a/Tests/CudaOnly/StaticRuntimePlusToolkit/nppif.cu b/Tests/CudaOnly/StaticRuntimePlusToolkit/nppif.cu
index ac5341c..1e7350a 100644
--- a/Tests/CudaOnly/StaticRuntimePlusToolkit/nppif.cu
+++ b/Tests/CudaOnly/StaticRuntimePlusToolkit/nppif.cu
@@ -8,7 +8,6 @@
#endif
#include <cstdio>
-#include <iostream>
#include <assert.h>
#include <cuda_runtime_api.h>
diff --git a/Tests/CudaOnly/Toolkit/CMakeLists.txt b/Tests/CudaOnly/Toolkit/CMakeLists.txt
index b2694bf..477c816 100644
--- a/Tests/CudaOnly/Toolkit/CMakeLists.txt
+++ b/Tests/CudaOnly/Toolkit/CMakeLists.txt
@@ -57,7 +57,7 @@ set(npp_libs nppc nppial nppicc nppidei nppif nppig nppim nppist nppitc npps npp
if(CUDAToolkit_VERSION_MAJOR VERSION_LESS 11)
list(APPEND npp_libs nppicom)
endif()
-foreach (cuda_lib )
+foreach (cuda_lib IN LISTS npp_libs)
if(NOT CUDA_${cuda_lib}_LIBRARY)
message(FATAL_ERROR "expected CUDAToolkit variable CUDA_${cuda_lib}_LIBRARY not found")
elseif(CUDA_${cuda_lib}_LIBRARY MATCHES [[\.\./]])
@@ -68,7 +68,11 @@ foreach (cuda_lib )
endif()
endforeach()
-foreach (cuda_lib nvrtc nvToolsExt OpenCL)
+set(nv_libs nvrtc OpenCL)
+if(CUDAToolkit_VERSION_MAJOR VERSION_LESS 12)
+ list(APPEND nv_libs nvToolsExt)
+endif()
+foreach (cuda_lib IN LISTS nv_libs)
if(NOT CUDA_${cuda_lib}_LIBRARY)
message(FATAL_ERROR "expected CUDAToolkit variable CUDA_${cuda_lib}_LIBRARY not found")
elseif(CUDA_${cuda_lib}_LIBRARY MATCHES [[\.\./]])