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
This commit is contained in:
Brad King
2013-02-08 13:38:56 -05:00
committed by CMake Topic Stage
75 changed files with 420 additions and 165 deletions

View File

@@ -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)

View File

@@ -83,6 +83,7 @@
ONLY_ACTIVE_ARCH = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
@id_toolset@
};
name = Debug;
};

View File

@@ -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