summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-10-14 18:06:38 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-17 14:17:33 (GMT)
commitd0e52219eb1c8a614bbb416f73c932b7858292f8 (patch)
treefdb0b7915dc8164d5e207092bc43268fbc1e8839 /Tests/CudaOnly
parent20bfbf783894681f8aeb9bf6b0cff9f4c9443832 (diff)
downloadCMake-d0e52219eb1c8a614bbb416f73c932b7858292f8.zip
CMake-d0e52219eb1c8a614bbb416f73c932b7858292f8.tar.gz
CMake-d0e52219eb1c8a614bbb416f73c932b7858292f8.tar.bz2
CUDA: Revert "Always mark cuda toolkit as system include"
We need to revert this change as it can disable error messages when compiling invalid CUDA code. This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system include, 2022-06-27, v3.25.0-rc1~269^2).
Diffstat (limited to 'Tests/CudaOnly')
-rw-r--r--Tests/CudaOnly/CMakeLists.txt6
-rw-r--r--Tests/CudaOnly/ToolkitIsSystemInclude/CMakeLists.txt7
-rw-r--r--Tests/CudaOnly/ToolkitIsSystemInclude/include/nvrtc.h5
-rw-r--r--Tests/CudaOnly/ToolkitIsSystemInclude/main.cu4
4 files changed, 2 insertions, 20 deletions
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index d23e929..091872d 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -27,12 +27,10 @@ if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
add_cuda_test_macro(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag)
endif()
+# The CUDA only ships the shared version of the toolkit libraries
+# on windows
if(NOT WIN32)
- # The CUDA only ships the shared version of the toolkit libraries
- # on windows
add_cuda_test_macro(CudaOnly.StaticRuntimePlusToolkit CudaOnlyStaticRuntimePlusToolkit)
- # `isystem` behaves differently on windows with nvcc
- add_cuda_test_macro(CudaOnly.ToolkitIsSystemInclude CudaOnlySystemInclude)
endif()
add_cuda_test_macro(CudaOnly.DeviceLTO CudaOnlyDeviceLTO)
diff --git a/Tests/CudaOnly/ToolkitIsSystemInclude/CMakeLists.txt b/Tests/CudaOnly/ToolkitIsSystemInclude/CMakeLists.txt
deleted file mode 100644
index bc347dd..0000000
--- a/Tests/CudaOnly/ToolkitIsSystemInclude/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-cmake_minimum_required(VERSION 3.24)
-project(ToolkitIsSystemInclude CUDA)
-
-# Verify that the nvrtc.h that is inside `CMAKE_CURRENT_SOURCE_DIR` is still
-# the first include for `.cu` files.
-add_executable(CudaOnlySystemInclude main.cu)
-target_include_directories(CudaOnlySystemInclude SYSTEM PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
diff --git a/Tests/CudaOnly/ToolkitIsSystemInclude/include/nvrtc.h b/Tests/CudaOnly/ToolkitIsSystemInclude/include/nvrtc.h
deleted file mode 100644
index 5a015c4..0000000
--- a/Tests/CudaOnly/ToolkitIsSystemInclude/include/nvrtc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#define CMAKE_CUDA_TOOLKIT_IS_SYSTEM 1
-
-int main()
-{
-}
diff --git a/Tests/CudaOnly/ToolkitIsSystemInclude/main.cu b/Tests/CudaOnly/ToolkitIsSystemInclude/main.cu
deleted file mode 100644
index 6cff8a1..0000000
--- a/Tests/CudaOnly/ToolkitIsSystemInclude/main.cu
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "nvrtc.h"
-#ifndef CMAKE_CUDA_TOOLKIT_IS_SYSTEM
-# error "Failed to specify the CUDA Toolkit includes as system"
-#endif