CMake/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
Brad King b97736a23d VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8
For VS generator names that do not specify the platform name, read
CMAKE_GENERATOR_PLATFORM to get it.

Extend the RunCMake.GeneratorPlatform test with a case covering
use of the x64 platform when the test generator is a Visual Studio
generator whose name does not specify a platform.
2014-09-05 15:03:56 -04:00

14 lines
387 B
CMake

include(RunCMake)
run_cmake(NoPlatform)
if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$")
set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=x64")
run_cmake(x64Platform)
unset(RunCMake_TEST_OPTIONS)
else()
set(RunCMake_TEST_OPTIONS "-DCMAKE_GENERATOR_PLATFORM=Bad Platform")
run_cmake(BadPlatform)
unset(RunCMake_TEST_OPTIONS)
endif()