diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2023-11-07 15:48:32 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2023-11-07 15:48:32 (GMT) |
commit | d7642a7d423aa5e182dd188849f2ce0453bf9515 (patch) | |
tree | 99ea8d2153e2e135897b929002c7a8faf1526814 /Tests | |
parent | 5afd411ed0722869ae1be535ba0f9549009b5acc (diff) | |
download | CMake-d7642a7d423aa5e182dd188849f2ce0453bf9515.zip CMake-d7642a7d423aa5e182dd188849f2ce0453bf9515.tar.gz CMake-d7642a7d423aa5e182dd188849f2ce0453bf9515.tar.bz2 |
CUDA: Support CMAKE_TRY_COMPILE_TARGET_TYPE of STATIC_LIBRARY
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CudaOnly/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/CudaOnly/TryCompileTargetStatic/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CudaOnly/TryCompileTargetStatic/main.cu | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt index b7ce5a1..32940eb 100644 --- a/Tests/CudaOnly/CMakeLists.txt +++ b/Tests/CudaOnly/CMakeLists.txt @@ -15,6 +15,7 @@ add_cuda_test_macro(CudaOnly.Standard98 CudaOnlyStandard98) add_cuda_test_macro(CudaOnly.Toolkit CudaOnlyToolkit) add_cuda_test_macro(CudaOnly.ToolkitBeforeLang CudaOnlyToolkitBeforeLang) add_cuda_test_macro(CudaOnly.ToolkitMultipleDirs CudaOnlyToolkitMultipleDirs) +add_cuda_test_macro(CudaOnly.TryCompileTargetStatic CudaOnlyTryCompileTargetStatic) add_cuda_test_macro(CudaOnly.WithDefs CudaOnlyWithDefs) add_cuda_test_macro(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine) add_cuda_test_macro(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols) diff --git a/Tests/CudaOnly/TryCompileTargetStatic/CMakeLists.txt b/Tests/CudaOnly/TryCompileTargetStatic/CMakeLists.txt new file mode 100644 index 0000000..340c1c9 --- /dev/null +++ b/Tests/CudaOnly/TryCompileTargetStatic/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.25) + +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +project(TryCompileTargetStatic LANGUAGES CUDA) + +add_executable(CudaOnlyTryCompileTargetStatic main.cu) diff --git a/Tests/CudaOnly/TryCompileTargetStatic/main.cu b/Tests/CudaOnly/TryCompileTargetStatic/main.cu new file mode 100644 index 0000000..766b775 --- /dev/null +++ b/Tests/CudaOnly/TryCompileTargetStatic/main.cu @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} |