summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Wozniak <benjamin.wozniak@intenta.de>2019-08-23 06:32:28 (GMT)
committerBenjamin Wozniak <benjamin.wozniak@intenta.de>2019-08-30 06:14:01 (GMT)
commit25f29b974182ae7da36ace86e846b4c0b2807a68 (patch)
tree763757ec0860be30482cfa79e283bea66932e52a
parentee86770a3f9700374820f90959a9c0fa39b27409 (diff)
downloadCMake-25f29b974182ae7da36ace86e846b4c0b2807a68.zip
CMake-25f29b974182ae7da36ace86e846b4c0b2807a68.tar.gz
CMake-25f29b974182ae7da36ace86e846b4c0b2807a68.tar.bz2
cuda: Adapted tests to work with modified cuda toolset
- cuda version is only recognized if it contains no other characters than "0123456789." - cuda path is only tested with dummy value . Otherwise a cuda toolkit must be copied to the integration test machine
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt12
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly.cmake1
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaVersionOnly-stdout.txt (renamed from Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt)2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCudaVersionOnly.cmake (renamed from Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake)0
7 files changed, 23 insertions, 7 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index ef8fd25..ae75561 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -6,12 +6,14 @@ run_cmake(NoToolset)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
run_cmake(TestToolset)
- set(RunCMake_GENERATOR_TOOLSET "Test Toolset,cuda=Test Cuda")
+ set(RunCMake_GENERATOR_TOOLSET "Test Toolset,cuda=0.0")
run_cmake(TestToolsetCudaBoth)
- set(RunCMake_GENERATOR_TOOLSET ",cuda=Test Cuda")
- run_cmake(TestToolsetCudaOnly)
- set(RunCMake_GENERATOR_TOOLSET "cuda=Test Cuda")
- run_cmake(TestToolsetCudaOnly)
+ set(RunCMake_GENERATOR_TOOLSET ",cuda=0.0")
+ run_cmake(TestToolsetCudaVersionOnly)
+ set(RunCMake_GENERATOR_TOOLSET "cuda=0.0")
+ run_cmake(TestToolsetCudaVersionOnly)
+ set(RunCMake_GENERATOR_TOOLSET "cuda=C:\\dummy\\cuda")
+ run_cmake(TestToolsetCudaPathOnly)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[2456]")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
run_cmake(TestToolsetHostArchBoth)
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt
index 90503e2..f12c123 100644
--- a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt
@@ -1,2 +1,2 @@
-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset'
--- CMAKE_VS_PLATFORM_TOOLSET_CUDA='Test Cuda'
+-- CMAKE_VS_PLATFORM_TOOLSET_CUDA='0.0'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt
new file mode 100644
index 0000000..b17745f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly-stderr.txt
@@ -0,0 +1,12 @@
+CMake Error at CMakeLists.txt:[0-9]+ \(project\):
+ Generator
+
+ Visual Studio .*
+
+ given toolset
+
+ cuda=C:\\dummy\\cuda\\
+
+ cannot detect Visual Studio integration files in path
+
+ C:/dummy/cuda/CUDAVisualStudioIntegration/extras/visual_studio_integration/MSBuildExtensions
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly.cmake
new file mode 100644
index 0000000..2fc38e5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaPathOnly.cmake
@@ -0,0 +1 @@
+message(FATAL_ERROR "This should not be reached!")
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaVersionOnly-stdout.txt
index 94e1e43..1717ff8 100644
--- a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaVersionOnly-stdout.txt
@@ -1,2 +1,2 @@
-- CMAKE_VS_PLATFORM_TOOLSET='(v[0-9]+|Windows7.1SDK)'
--- CMAKE_VS_PLATFORM_TOOLSET_CUDA='Test Cuda'
+-- CMAKE_VS_PLATFORM_TOOLSET_CUDA='0.0'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaVersionOnly.cmake
index befa0af..befa0af 100644
--- a/Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCudaVersionOnly.cmake