diff options
author | Brad King <brad.king@kitware.com> | 2012-12-20 15:16:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-02-07 16:07:48 (GMT) |
commit | f980a8049522782779b3a721c37f976de1e38dcc (patch) | |
tree | d694350146e9b498cac71a991eeb64d173fb597f /Tests | |
parent | 650c6471600fa8b06ed343ff3a4f3d16a3dc95bc (diff) | |
download | CMake-f980a8049522782779b3a721c37f976de1e38dcc.zip CMake-f980a8049522782779b3a721c37f976de1e38dcc.tar.gz CMake-f980a8049522782779b3a721c37f976de1e38dcc.tar.bz2 |
Xcode: Implement generator toolset selection (#9831, #13802)
Implement generator toolset selection (cmake -T) for Xcode > 2.0 by
adding the GCC_VERSION build setting to project files.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index a90fd7b..7abedb6 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -41,10 +41,15 @@ macro(add_RunCMake_test test) -DRunCMake_GENERATOR=${CMAKE_TEST_GENERATOR} -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test} -DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test} + ${${test}_ARGS} -P "${CMAKE_CURRENT_SOURCE_DIR}/${test}/RunCMakeTest.cmake" ) endmacro() +if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 3) + set(GeneratorToolset_ARGS -DXCODE_BELOW_3=1) +endif() + add_RunCMake_test(CMP0019) add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorToolset) diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 49b63de..007280a 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -2,7 +2,7 @@ include(RunCMake) run_cmake(NoToolset) -if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01]") +if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01]|Xcode" AND NOT XCODE_BELOW_3) set(RunCMake_TEST_OPTIONS -T "Test Toolset") run_cmake(TestToolset) unset(RunCMake_TEST_OPTIONS) |