diff options
author | Brad King <brad.king@kitware.com> | 2019-01-28 15:44:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-28 16:22:50 (GMT) |
commit | 17cef3806d958bd03ec08b925fe585a0cfa204fa (patch) | |
tree | 897247990290b9e33d9b276a508c27d82452db8c /Tests/RunCMake | |
parent | bf774e521b0a08dd8e09a93f76471cad593db3c6 (diff) | |
download | CMake-17cef3806d958bd03ec08b925fe585a0cfa204fa.zip CMake-17cef3806d958bd03ec08b925fe585a0cfa204fa.tar.gz CMake-17cef3806d958bd03ec08b925fe585a0cfa204fa.tar.bz2 |
VS: Add support for explicit 32-bit toolset selection via host=x86
Generalize the ``host=x64`` option in `CMAKE_GENERATOR_TOOLSET`
to also support ``host=x86``.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x64-stdout.txt (renamed from Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x64.cmake (renamed from Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86.cmake | 2 |
6 files changed, 10 insertions, 4 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt index 164d3aa..7067423 100644 --- a/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt @@ -5,6 +5,6 @@ CMake Error at CMakeLists.txt:[0-9]+ \(project\): given toolset specification - Test Toolset,host=x64,host=x64 + Test Toolset,host=x64,host=x86 that contains duplicate field key 'host'\.$ diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index ccf58b4..ef8fd25 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -16,14 +16,16 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012456]") set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64") run_cmake(TestToolsetHostArchBoth) set(RunCMake_GENERATOR_TOOLSET ",host=x64") - run_cmake(TestToolsetHostArchOnly) + run_cmake(TestToolsetHostArchOnly_x64) set(RunCMake_GENERATOR_TOOLSET "host=x64") - run_cmake(TestToolsetHostArchOnly) + run_cmake(TestToolsetHostArchOnly_x64) + set(RunCMake_GENERATOR_TOOLSET "host=x86") + run_cmake(TestToolsetHostArchOnly_x86) set(RunCMake_GENERATOR_TOOLSET "Test Toolset") run_cmake(TestToolsetHostArchNone) set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x65") run_cmake(BadToolsetHostArch) - set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64,host=x64") + set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64,host=x86") run_cmake(BadToolsetHostArchTwice) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[56]") set(RunCMake_GENERATOR_TOOLSET "Test Toolset,version=Test Toolset Version") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x64-stdout.txt index 8271bd4..8271bd4 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly-stdout.txt +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x64-stdout.txt diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x64.cmake index 26926f9..26926f9 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly.cmake +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x64.cmake diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86-stdout.txt new file mode 100644 index 0000000..c7293dc --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_VS_PLATFORM_TOOLSET='v[0-9]+' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='x86' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86.cmake new file mode 100644 index 0000000..26926f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchOnly_x86.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}'") |