diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt index 576b40c..e5e6c8d 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone-stdout.txt @@ -1,2 +1,2 @@ -- CMAKE_VS_PLATFORM_TOOLSET='Test Toolset' --- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='' +-- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='.*' diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake index 26926f9..085bb6b 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake @@ -1,2 +1,15 @@ message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'") message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'") + +if(CMAKE_GENERATOR MATCHES "Visual Studio 1[6]") + cmake_host_system_information(RESULT is_64_bit QUERY IS_64BIT) + if(is_64_bit) + if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "x64") + message(FATAL_ERROR "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE is not 'x64' as expected.") + endif() + endif() +else() + if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "") + message(FATAL_ERROR "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE is not empty as expected.") + endif() +endif() |