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 /Modules | |
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 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 5 | ||||
-rw-r--r-- | Modules/CompilerId/Xcode-3.pbxproj.in | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 609f35b..b918092 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -177,6 +177,11 @@ Id flags: ${testflags} set(id_type ${CMAKE_${lang}_COMPILER_XCODE_TYPE}) set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR}) get_filename_component(id_src "${src}" NAME) + if(CMAKE_XCODE_PLATFORM_TOOLSET) + set(id_toolset "GCC_VERSION = ${CMAKE_XCODE_PLATFORM_TOOLSET};") + else() + set(id_toolset "") + endif() if(NOT ${XCODE_VERSION} VERSION_LESS 3) set(v 3) set(ext xcodeproj) diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in index 41ca7db..d94a803 100644 --- a/Modules/CompilerId/Xcode-3.pbxproj.in +++ b/Modules/CompilerId/Xcode-3.pbxproj.in @@ -83,6 +83,7 @@ ONLY_ACTIVE_ARCH = YES; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)"; SYMROOT = .; + @id_toolset@ }; name = Debug; }; |