2012-12-10 19:42:33 +04:00
|
|
|
include(RunCMake)
|
|
|
|
|
2013-02-06 01:10:36 +04:00
|
|
|
set(RunCMake_GENERATOR_TOOLSET "")
|
2012-12-10 19:42:33 +04:00
|
|
|
run_cmake(NoToolset)
|
|
|
|
|
2014-06-24 23:39:11 +04:00
|
|
|
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124]|Xcode" AND NOT XCODE_BELOW_3)
|
2013-02-06 01:10:36 +04:00
|
|
|
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
|
2012-12-10 19:52:10 +04:00
|
|
|
run_cmake(TestToolset)
|
|
|
|
else()
|
2013-02-06 01:10:36 +04:00
|
|
|
set(RunCMake_GENERATOR_TOOLSET "Bad Toolset")
|
2012-12-10 19:52:10 +04:00
|
|
|
run_cmake(BadToolset)
|
|
|
|
endif()
|
2012-12-10 19:42:33 +04:00
|
|
|
|
2013-02-06 01:10:36 +04:00
|
|
|
set(RunCMake_GENERATOR_TOOLSET "")
|
2014-06-04 21:21:55 +04:00
|
|
|
|
2013-02-06 01:10:36 +04:00
|
|
|
set(RunCMake_TEST_OPTIONS -T "Extra Toolset")
|
2012-12-10 19:42:33 +04:00
|
|
|
run_cmake(TwoToolsets)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
2014-06-04 21:21:55 +04:00
|
|
|
|
2014-06-24 23:39:11 +04:00
|
|
|
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124]|Xcode" AND NOT XCODE_BELOW_3)
|
2014-06-04 21:21:55 +04:00
|
|
|
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake)
|
|
|
|
run_cmake(TestToolsetToolchain)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
else()
|
|
|
|
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/BadToolset-toolchain.cmake)
|
|
|
|
run_cmake(BadToolsetToolchain)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
endif()
|