Commit 7373b389 authored by Brad King's avatar Brad King

Xcode: Drop support for Xcode versions below 3

parent eaf53849
......@@ -3,6 +3,8 @@ Xcode
Generate Xcode project files.
This supports Xcode 3.0 and above.
Toolset Selection
^^^^^^^^^^^^^^^^^
......
remove-xcode-2
--------------
* The :generator:`Xcode` generator dropped support for Xcode versions
older than 3.
......@@ -324,18 +324,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
else()
set(id_sdkroot "")
endif()
if(NOT ${XCODE_VERSION} VERSION_LESS 3)
set(v 3)
set(ext xcodeproj)
elseif(NOT ${XCODE_VERSION} VERSION_LESS 2)
set(v 2)
set(ext xcodeproj)
else()
set(v 1)
set(ext xcode)
endif()
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-${v}.pbxproj.in
${id_dir}/CompilerId${lang}.${ext}/project.pbxproj @ONLY)
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in
${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY)
unset(_ENV_MACOSX_DEPLOYMENT_TARGET)
if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET})
set(_ENV_MACOSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}")
......
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 39;
objects = {
014CEA460018CE2711CA2923 = {
buildSettings = {
};
isa = PBXBuildStyle;
name = Development;
};
08FB7793FE84155DC02AAC07 = {
buildSettings = {
};
buildStyles = (
014CEA460018CE2711CA2923,
);
hasScannedForEncodings = 1;
isa = PBXProject;
mainGroup = 08FB7794FE84155DC02AAC07;
projectDirPath = "";
targets = (
8DD76FA90486AB0100D96B5E,
);
};
08FB7794FE84155DC02AAC07 = {
children = (
08FB7795FE84155DC02AAC07,
1AB674ADFE9D54B511CA2CBB,
);
isa = PBXGroup;
name = CompilerId@id_lang@;
refType = 4;
sourceTree = "<group>";
};
08FB7795FE84155DC02AAC07 = {
children = (
2C18F0B415DC1DC700593670,
);
isa = PBXGroup;
name = Source;
refType = 4;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB = {
children = (
8DD76F6C0486A84900D96B5E,
);
isa = PBXGroup;
name = Products;
refType = 4;
sourceTree = "<group>";
};
2C18F0B415DC1DC700593670 = {
fileEncoding = 30;
isa = PBXFileReference;
explicitFileType = @id_type@;
path = @id_src@;
refType = 4;
sourceTree = "<group>";
};
2C18F0B615DC1E0300593670 = {
fileRef = 2C18F0B415DC1DC700593670;
isa = PBXBuildFile;
settings = {
};
};
2C8FEB8E15DC1A1A00E56A5D = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"GCC_VERSION=$GCC_VERSION\"";
};
8DD76FA90486AB0100D96B5E = {
buildPhases = (
2C18F0B515DC1DCE00593670,
2C8FEB8E15DC1A1A00E56A5D,
);
buildRules = (
);
buildSettings = {
PRODUCT_NAME = CompilerId@id_lang@;
SYMROOT = .;
};
dependencies = (
);
isa = PBXNativeTarget;
name = CompilerId@id_lang@;
productName = CompilerId@id_lang@;
productReference = 8DD76F6C0486A84900D96B5E;
productType = "com.apple.product-type.tool";
};
2C18F0B515DC1DCE00593670 = {
buildActionMask = 2147483647;
files = (
2C18F0B615DC1E0300593670,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
};
8DD76F6C0486A84900D96B5E = {
explicitFileType = "compiled.mach-o.executable";
includeInIndex = 0;
isa = PBXFileReference;
path = CompilerId@id_lang@;
refType = 3;
sourceTree = BUILT_PRODUCTS_DIR;
};
};
rootObject = 08FB7793FE84155DC02AAC07;
}
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objects = {
2C18F0B615DC1E0300593670 = {isa = PBXBuildFile; fileRef = 2C18F0B415DC1DC700593670; };
2C18F0B415DC1DC700593670 = {isa = PBXFileReference; fileEncoding = 4; explicitFileType = @id_type@; path = @id_src@; sourceTree = "<group>"; };
8DD76F6C0486A84900D96B5E = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CompilerId@id_lang@; sourceTree = BUILT_PRODUCTS_DIR; };
08FB7794FE84155DC02AAC07 = {
isa = PBXGroup;
children = (
08FB7795FE84155DC02AAC07,
1AB674ADFE9D54B511CA2CBB,
);
name = CompilerId@id_lang@;
sourceTree = "<group>";
};
08FB7795FE84155DC02AAC07 = {
isa = PBXGroup;
children = (
2C18F0B415DC1DC700593670,
);
name = Source;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB = {
isa = PBXGroup;
children = (
8DD76F6C0486A84900D96B5E,
);
name = Products;
sourceTree = "<group>";
};
8DD76FA90486AB0100D96B5E = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB928508733DD80010E9CD;
buildPhases = (
2C18F0B515DC1DCE00593670,
2C8FEB8E15DC1A1A00E56A5D,
);
buildRules = (
);
dependencies = (
);
name = CompilerId@id_lang@;
productName = CompilerId@id_lang@;
productReference = 8DD76F6C0486A84900D96B5E;
productType = "com.apple.product-type.tool";
};
08FB7793FE84155DC02AAC07 = {
isa = PBXProject;
buildConfigurationList = 1DEB928908733DD80010E9CD;
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07;
projectDirPath = "";
targets = (
8DD76FA90486AB0100D96B5E,
);
};
2C8FEB8E15DC1A1A00E56A5D = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"GCC_VERSION=$GCC_VERSION\"";
};
2C18F0B515DC1DCE00593670 = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2C18F0B615DC1E0300593670,
);
runOnlyForDeploymentPostprocessing = 0;
};
1DEB928608733DD80010E9CD = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = CompilerId@id_lang@;
};
name = Debug;
};
1DEB928A08733DD80010E9CD = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
};
name = Debug;
};
1DEB928508733DD80010E9CD = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB928608733DD80010E9CD,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
1DEB928908733DD80010E9CD = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB928A08733DD80010E9CD,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
};
rootObject = 08FB7793FE84155DC02AAC07;
}
This diff is collapsed.
......@@ -34,16 +34,6 @@ target_link_libraries(CMakeLibTests CMakeLib)
add_executable(testEncoding testEncoding.cxx)
target_link_libraries(testEncoding cmsys)
# Xcode 2.x forgets to create the output directory before linking
# the individual architectures.
if(CMAKE_OSX_ARCHITECTURES AND XCODE
AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
add_custom_command(
TARGET CMakeLibTests
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
)
endif()
foreach(test ${CMakeLib_TESTS})
add_test(CMakeLib.${test} CMakeLibTests ${test} ${${test}_ARGS})
endforeach()
......
......@@ -24,18 +24,3 @@ target_link_libraries(memcheck_fail CMakeLib)
# output file. Need to be in their own subdirectory as they have the
# same filenames.
add_subdirectory(NoLog)
# Xcode 2.x forgets to create the output directory before linking
# the individual architectures.
if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
foreach(t
memcheck_fail
pseudo_BC
pseudo_purify
pseudo_valgrind
)
add_custom_command(TARGET ${t}
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
)
endforeach()
endif()
......@@ -11,12 +11,4 @@ configure_file(
foreach(_pseudo IN ITEMS valgrind purify BC)
add_executable(pseudonl_${_pseudo} "${CMAKE_CURRENT_BINARY_DIR}/ret0.c")
set_target_properties(pseudonl_${_pseudo} PROPERTIES OUTPUT_NAME ${_pseudo})
# Xcode 2.x forgets to create the output directory before linking
# the individual architectures.
if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
add_custom_command(TARGET pseudonl_${_pseudo}
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
)
endif()
endforeach()
......@@ -63,15 +63,6 @@ if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 6.1)
set(Swift_ARGS -DXCODE_BELOW_6_1=1)
endif()
if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 3)
set(GeneratorToolset_ARGS -DXCODE_BELOW_3=1)
endif()
if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 2)
set(TargetSources_ARGS -DXCODE_BELOW_2=1)
set(File_Generate_ARGS -DXCODE_BELOW_2=1)
endif()
# Test MSVC for older host CMake versions, and test
# WIN32/CMAKE_C_COMPILER_ID to fix check on Intel for Windows.
if(MSVC OR (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel"))
......@@ -280,7 +271,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([^89]|[89][0-9])")
add_RunCMake_test(VS10Project)
endif()
if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 3)
if(XCODE_VERSION)
add_RunCMake_test(XcodeProject -DXCODE_VERSION=${XCODE_VERSION})
endif()
......@@ -328,19 +319,6 @@ add_executable(pseudo_emulator_custom_command pseudo_emulator_custom_command.c)
add_RunCMake_test(CrosscompilingEmulator
-DPSEUDO_EMULATOR=$<TARGET_FILE:pseudo_emulator>
-DPSEUDO_EMULATOR_CUSTOM_COMMAND=$<TARGET_FILE:pseudo_emulator_custom_command>)
# Xcode 2.x forgets to create the output directory before linking
# the individual architectures.
if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
add_custom_command(
TARGET pseudo_emulator
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
)
add_custom_command(
TARGET pseudo_emulator_custom_command
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
)
endif()
if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
if(UNIX AND NOT CYGWIN)
execute_process(COMMAND ldd --help
......
include(RunCMake)
run_cmake(CommandConflict)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio|Xcode" AND NOT XCODE_BELOW_2)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio|Xcode")
run_cmake(OutputConflict)
endif()
run_cmake(EmptyCondition1)
......
......@@ -31,7 +31,7 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]")
endif()
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,not_a_key")
run_cmake(BadToolsetFormat)
elseif("${RunCMake_GENERATOR}" STREQUAL "Xcode" AND NOT XCODE_BELOW_3)
elseif("${RunCMake_GENERATOR}" STREQUAL "Xcode")
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
run_cmake(TestToolset)
set(RunCMake_GENERATOR_TOOLSET "Test Toolset,host=x64")
......@@ -47,7 +47,7 @@ set(RunCMake_TEST_OPTIONS -T "Extra Toolset")
run_cmake(TwoToolsets)
unset(RunCMake_TEST_OPTIONS)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3)
if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode")
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake)
run_cmake(TestToolsetToolchain)
unset(RunCMake_TEST_OPTIONS)
......
include(RunCMake)
if(RunCMake_GENERATOR MATCHES "Visual Studio|Xcode" AND NOT XCODE_BELOW_2)
if(RunCMake_GENERATOR MATCHES "Visual Studio|Xcode")
run_cmake(ConfigNotAllowed)
run_cmake(OriginDebugIDE)
else()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment