diff options
author | Brad King <brad.king@kitware.com> | 2013-02-08 18:38:56 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-08 18:38:56 (GMT) |
commit | 7dab997771e4f496fd71a4e9c3abc26063c57c68 (patch) | |
tree | c591caee76cbcc3938e54823c2b06f30d6f698b0 /Modules | |
parent | 2cd362d19114e4b8a85c3c5179734d12416f4d72 (diff) | |
parent | 56ca8d4e6365d67901e0cff7f2bd99f174537a97 (diff) | |
download | CMake-7dab997771e4f496fd71a4e9c3abc26063c57c68.zip CMake-7dab997771e4f496fd71a4e9c3abc26063c57c68.tar.gz CMake-7dab997771e4f496fd71a4e9c3abc26063c57c68.tar.bz2 |
Merge topic 'generator-toolset'
56ca8d4 Tests: Add generator toolset support
f36c665 Tests: Consolidate ctest --build-and-test generator options
c0debb1 Merge branch 'master' into generator-toolset
daae0d2 ExternalProject: Propagate the generator toolset
e3841cf CTest: Add options to set generator toolset
f980a80 Xcode: Implement generator toolset selection (#9831, #13802)
650c647 VS: Implement generator toolset selection (#10722, #13774)
4fd5342 CMake: Add -T option to choose a generator toolset
118c32f Merge branch 'xcode-duplicate-flags-13354' into generator-toolset
cf8645e Tests: Run ctest custom commands with VERBATIM
5b2fba5 ExternalProject: Simplify CMake command line generation
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 5 | ||||
-rw-r--r-- | Modules/CompilerId/Xcode-3.pbxproj.in | 1 | ||||
-rw-r--r-- | Modules/ExternalProject.cmake | 20 |
3 files changed, 22 insertions, 4 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; }; diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index ed7fd7c..bf2892b 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -38,6 +38,7 @@ # [CONFIGURE_COMMAND cmd...] # Build tree configuration command # [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable # [CMAKE_GENERATOR gen] # Specify generator for native build +# [CMAKE_GENERATOR_TOOLSET t] # Generator-specific toolset name # [CMAKE_ARGS args...] # Arguments to CMake command line # [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on # #--Build step----------------- @@ -1588,16 +1589,27 @@ function(_ep_add_configure_command name) endif() get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR) + get_target_property(cmake_generator_toolset ${name} _EP_CMAKE_GENERATOR_TOOLSET) if(cmake_generator) - list(APPEND cmd "-G${cmake_generator}" "${source_dir}") + list(APPEND cmd "-G${cmake_generator}") + if(cmake_generator_toolset) + list(APPEND cmd "-T${cmake_generator_toolset}") + endif() else() if(CMAKE_EXTRA_GENERATOR) - list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}" - "${source_dir}") + list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}") else() - list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}") + list(APPEND cmd "-G${CMAKE_GENERATOR}") + endif() + if(cmake_generator_toolset) + message(FATAL_ERROR "Option CMAKE_GENERATOR_TOOLSET not allowed without CMAKE_GENERATOR.") + endif() + if(CMAKE_GENERATOR_TOOLSET) + list(APPEND cmd "-T${CMAKE_GENERATOR_TOOLSET}") endif() endif() + + list(APPEND cmd "${source_dir}") endif() # If anything about the configure command changes, (command itself, cmake |