2014-09-05 22:25:27 +04:00
|
|
|
include(RunCMake)
|
|
|
|
|
2014-09-05 23:40:01 +04:00
|
|
|
set(RunCMake_GENERATOR_PLATFORM "")
|
2014-09-05 22:25:27 +04:00
|
|
|
run_cmake(NoPlatform)
|
|
|
|
|
2016-09-02 23:15:11 +03:00
|
|
|
if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[01245])( 20[0-9][0-9])?$")
|
2014-09-05 23:40:01 +04:00
|
|
|
set(RunCMake_GENERATOR_PLATFORM "x64")
|
2014-09-05 22:53:01 +04:00
|
|
|
run_cmake(x64Platform)
|
|
|
|
else()
|
2014-09-05 23:40:01 +04:00
|
|
|
set(RunCMake_GENERATOR_PLATFORM "Bad Platform")
|
2014-09-05 22:53:01 +04:00
|
|
|
run_cmake(BadPlatform)
|
|
|
|
endif()
|
2014-09-12 17:55:06 +04:00
|
|
|
|
|
|
|
set(RunCMake_GENERATOR_TOOLSET "")
|
|
|
|
|
|
|
|
set(RunCMake_TEST_OPTIONS -A "Extra Platform")
|
|
|
|
run_cmake(TwoPlatforms)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
2014-09-12 18:38:54 +04:00
|
|
|
|
2016-09-02 23:15:11 +03:00
|
|
|
if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[01245])( 20[0-9][0-9])?$")
|
2014-09-12 18:38:54 +04:00
|
|
|
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake)
|
|
|
|
run_cmake(TestPlatformToolchain)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
else()
|
|
|
|
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/BadPlatform-toolchain.cmake)
|
|
|
|
run_cmake(BadPlatformToolchain)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
endif()
|