mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'generator-toolset'
56ca8d4Tests: Add generator toolset supportf36c665Tests: Consolidate ctest --build-and-test generator optionsc0debb1Merge branch 'master' into generator-toolsetdaae0d2ExternalProject: Propagate the generator toolsete3841cfCTest: Add options to set generator toolsetf980a80Xcode: Implement generator toolset selection (#9831, #13802)650c647VS: Implement generator toolset selection (#10722, #13774)4fd5342CMake: Add -T option to choose a generator toolset118c32fMerge branch 'xcode-duplicate-flags-13354' into generator-toolsetcf8645eTests: Run ctest custom commands with VERBATIM5b2fba5ExternalProject: Simplify CMake command line generation
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
SYMROOT = .;
|
||||
@id_toolset@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user