diff options
Diffstat (limited to 'Tests/RunCMake')
10 files changed, 39 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt new file mode 100644 index 0000000..5737e95 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at CMakeLists.txt:[0-9]+ \(project\): + Generator + + .* + + does not recognize the toolset + + Test Toolset,host=x6[45] + + that was specified\.$ diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake new file mode 100644 index 0000000..2fc38e5 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArch.cmake @@ -0,0 +1 @@ +message(FATAL_ERROR "This should not be reached!") diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 283a2a0..e8ce47d 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -6,6 +6,21 @@ run_cmake(NoToolset) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolset) + if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[245]") + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(TestToolsetHostArchBoth) + set(RunCMake_GENERATOR_TOOLSET ",host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "host=x64") + run_cmake(TestToolsetHostArchOnly) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset") + run_cmake(TestToolsetHostArchNone) + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x65") + run_cmake(BadToolsetHostArch) + else() + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") + run_cmake(BadToolsetHostArch) + endif() else() set(RunCMake_GENERATOR_TOOLSET "Bad Toolset") run_cmake(BadToolset) diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt new file mode 100644 index 0000000..f0b6d46 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchBoth.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt new file mode 100644 index 0000000..576b40c --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt new file mode 100644 index 0000000..8271bd4 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x64' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake @@ -0,0 +1,2 @@ +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") +message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") |