[Cmake-commits] CMake branch, master, updated. v3.8.0-892-gdc6632b

Kitware Robot kwrobot at kitware.com
Mon Apr 24 09:45:02 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  dc6632b9da0b804e6c00b71f06b26f561475858d (commit)
       via  96b2637474c261dbbaab52b05af153f24f3094dd (commit)
       via  0039ddb6f2a4604d90e15041aca8eb1b048063af (commit)
       via  096c3bacea33a3a1192d065d88f9bc6c995846ee (commit)
       via  3ade7a306e0d002a6bfc89b20b7b1483643877ea (commit)
       via  7373b389ebf482fd16c70ff0e8b5abf403b4be07 (commit)
       via  ece4f647491eb81d3be55881a47752ce4ff88da9 (commit)
       via  6d4fa0210e49c29ab0f159b069174aa7d310b978 (commit)
       via  81f9c9e892e6b4ee873361b3750a87760ebe8a2d (commit)
       via  eaf53849ec760ecc1000ab6f56519f203c9b4ff5 (commit)
       via  3d1bd0111447909bec0582e8c0128a427a5eeaba (commit)
       via  5969048d1dbd531902f187699e47754115274564 (commit)
       via  0bee006602f07e26d052ba30541e6ce61a621b63 (commit)
       via  789c8de3df0c18fe8b0912286e4c1810542a79e9 (commit)
      from  aaeb01ef9bfa600e072be79792be53186c395a8c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc6632b9da0b804e6c00b71f06b26f561475858d
commit dc6632b9da0b804e6c00b71f06b26f561475858d
Merge: 96b2637 7373b38
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 24 13:40:40 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Apr 24 09:40:44 2017 -0400

    Merge topic 'remove-xcode-2'
    
    7373b389 Xcode: Drop support for Xcode versions below 3
    eaf53849 Xcode: Compute version number earlier
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Reviewed-by: Gregor Jasny <gjasny at googlemail.com>
    Merge-request: !737


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96b2637474c261dbbaab52b05af153f24f3094dd
commit 96b2637474c261dbbaab52b05af153f24f3094dd
Merge: 0039ddb ece4f64
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 24 13:37:56 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Apr 24 09:38:02 2017 -0400

    Merge topic 'findmpi-improvements'
    
    ece4f647 FindMPI: Modernize documentation
    6d4fa021 FindMPI: MPIEXEC handling improvements
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !740


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0039ddb6f2a4604d90e15041aca8eb1b048063af
commit 0039ddb6f2a4604d90e15041aca8eb1b048063af
Merge: 096c3ba 3d1bd01
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 24 13:36:59 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Apr 24 09:37:02 2017 -0400

    Merge topic 'ctest-minor-fixups'
    
    3d1bd011 cmCTestTestHandler: use pointers to static memory
    5969048d cmCTestTestCommand: defer getting the global timeout
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !735


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=096c3bacea33a3a1192d065d88f9bc6c995846ee
commit 096c3bacea33a3a1192d065d88f9bc6c995846ee
Merge: 3ade7a3 81f9c9e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 24 13:36:07 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Apr 24 09:36:10 2017 -0400

    Merge topic 'vs8-deprecate'
    
    81f9c9e8 Deprecate Visual Studio 8 2005 generator
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !739


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ade7a306e0d002a6bfc89b20b7b1483643877ea
commit 3ade7a306e0d002a6bfc89b20b7b1483643877ea
Merge: aaeb01e 0bee006
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 24 13:35:25 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Apr 24 09:35:29 2017 -0400

    Merge topic 'namespace-jar-exports'
    
    0bee0066 Tests: Test namespaces with exported JARs
    789c8de3 UseJava: Support namespaced exports
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !729


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7373b389ebf482fd16c70ff0e8b5abf403b4be07
commit 7373b389ebf482fd16c70ff0e8b5abf403b4be07
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 21 12:57:11 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Apr 22 15:19:11 2017 -0400

    Xcode: Drop support for Xcode versions below 3

diff --git a/Help/generator/Xcode.rst b/Help/generator/Xcode.rst
index 25ff4c7..968c26a 100644
--- a/Help/generator/Xcode.rst
+++ b/Help/generator/Xcode.rst
@@ -3,6 +3,8 @@ Xcode
 
 Generate Xcode project files.
 
+This supports Xcode 3.0 and above.
+
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 
diff --git a/Help/release/dev/remove-xcode-2.rst b/Help/release/dev/remove-xcode-2.rst
new file mode 100644
index 0000000..5b36582
--- /dev/null
+++ b/Help/release/dev/remove-xcode-2.rst
@@ -0,0 +1,5 @@
+remove-xcode-2
+--------------
+
+* The :generator:`Xcode` generator dropped support for Xcode versions
+  older than 3.
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 687263a..eeb806f 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -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}")
diff --git a/Modules/CompilerId/Xcode-1.pbxproj.in b/Modules/CompilerId/Xcode-1.pbxproj.in
deleted file mode 100644
index 793ad02..0000000
--- a/Modules/CompilerId/Xcode-1.pbxproj.in
+++ /dev/null
@@ -1,120 +0,0 @@
-// !$*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 at 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 at id_lang@;
-				SYMROOT = .;
-			};
-			dependencies = (
-			);
-			isa = PBXNativeTarget;
-			name = CompilerId at id_lang@;
-			productName = CompilerId at 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 at id_lang@;
-			refType = 3;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-	};
-	rootObject = 08FB7793FE84155DC02AAC07;
-}
diff --git a/Modules/CompilerId/Xcode-2.pbxproj.in b/Modules/CompilerId/Xcode-2.pbxproj.in
deleted file mode 100644
index 226b413..0000000
--- a/Modules/CompilerId/Xcode-2.pbxproj.in
+++ /dev/null
@@ -1,119 +0,0 @@
-// !$*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 at id_lang@; sourceTree = BUILT_PRODUCTS_DIR; };
-
-		08FB7794FE84155DC02AAC07 = {
-			isa = PBXGroup;
-			children = (
-				08FB7795FE84155DC02AAC07,
-				1AB674ADFE9D54B511CA2CBB,
-			);
-			name = CompilerId at 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 at id_lang@;
-			productName = CompilerId at 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 at 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;
-}
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 8968bb2..6636329 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -192,13 +192,14 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
   sscanf(version_string.c_str(), "%u.%u", &v[0], &v[1]);
   unsigned int version_number = 10 * v[0] + v[1];
 
+  if (version_number < 30) {
+    cm->IssueMessage(cmake::FATAL_ERROR,
+                     "Xcode " + version_string + " not supported.");
+    return CM_NULLPTR;
+  }
+
   CM_AUTO_PTR<cmGlobalXCodeGenerator> gg(
     new cmGlobalXCodeGenerator(cm, version_string, version_number));
-  if (gg->XcodeVersion == 20) {
-    cmSystemTools::Message("Xcode 2.0 not really supported by cmake, "
-                           "using Xcode 15 generator\n");
-    gg->XcodeVersion = 15;
-  }
   return gg.release();
 #else
   std::cerr << "CMake should be built with cmake to use Xcode, "
@@ -245,29 +246,25 @@ std::string cmGlobalXCodeGenerator::FindXcodeBuildCommand()
 bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
                                                  cmMakefile* mf)
 {
-  if (this->XcodeVersion >= 30) {
-    if (ts.find_first_of(",=") != ts.npos) {
-      std::ostringstream e;
-      /* clang-format off */
-      e <<
-        "Generator\n"
-        "  " << this->GetName() << "\n"
-        "does not recognize the toolset\n"
-        "  " << ts << "\n"
-        "that was specified.";
-      /* clang-format on */
-      mf->IssueMessage(cmake::FATAL_ERROR, e.str());
-      return false;
-    }
-    this->GeneratorToolset = ts;
-    if (!this->GeneratorToolset.empty()) {
-      mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET",
-                        this->GeneratorToolset.c_str());
-    }
-    return true;
-  } else {
-    return cmGlobalGenerator::SetGeneratorToolset(ts, mf);
+  if (ts.find_first_of(",=") != ts.npos) {
+    std::ostringstream e;
+    /* clang-format off */
+    e <<
+      "Generator\n"
+      "  " << this->GetName() << "\n"
+      "does not recognize the toolset\n"
+      "  " << ts << "\n"
+      "that was specified.";
+    /* clang-format on */
+    mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+    return false;
+  }
+  this->GeneratorToolset = ts;
+  if (!this->GeneratorToolset.empty()) {
+    mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET",
+                      this->GeneratorToolset.c_str());
   }
+  return true;
 }
 
 void cmGlobalXCodeGenerator::EnableLanguage(
@@ -275,16 +272,13 @@ void cmGlobalXCodeGenerator::EnableLanguage(
 {
   mf->AddDefinition("XCODE", "1");
   mf->AddDefinition("XCODE_VERSION", this->VersionString.c_str());
-  if (this->XcodeVersion == 15) {
-  } else {
-    if (!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) {
-      mf->AddCacheDefinition(
-        "CMAKE_CONFIGURATION_TYPES", "Debug;Release;MinSizeRel;RelWithDebInfo",
-        "Semicolon separated list of supported configuration types, "
-        "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
-        "anything else will be ignored.",
-        cmStateEnums::STRING);
-    }
+  if (!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) {
+    mf->AddCacheDefinition(
+      "CMAKE_CONFIGURATION_TYPES", "Debug;Release;MinSizeRel;RelWithDebInfo",
+      "Semicolon separated list of supported configuration types, "
+      "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
+      "anything else will be ignored.",
+      cmStateEnums::STRING);
   }
   mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
   this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
@@ -304,9 +298,7 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
   makeCommand.push_back("-project");
   std::string projectArg = projectName;
   projectArg += ".xcode";
-  if (this->XcodeVersion > 20) {
-    projectArg += "proj";
-  }
+  projectArg += "proj";
   makeCommand.push_back(projectArg);
 
   bool clean = false;
@@ -326,13 +318,8 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
   } else {
     makeCommand.push_back("ALL_BUILD");
   }
-  if (this->XcodeVersion == 15) {
-    makeCommand.push_back("-buildstyle");
-    makeCommand.push_back("Development");
-  } else {
-    makeCommand.push_back("-configuration");
-    makeCommand.push_back(!config.empty() ? config : "Debug");
-  }
+  makeCommand.push_back("-configuration");
+  makeCommand.push_back(!config.empty() ? config : "Debug");
   makeCommand.insert(makeCommand.end(), makeOptions.begin(),
                      makeOptions.end());
 }
@@ -394,9 +381,7 @@ std::string cmGlobalXCodeGenerator::PostBuildMakeTarget(
   std::string target = tName;
   std::replace(target.begin(), target.end(), ' ', '_');
   std::string out = "PostBuild." + target;
-  if (this->XcodeVersion > 20) {
-    out += "." + configName;
-  }
+  out += "." + configName;
   return out;
 }
 
@@ -606,12 +591,7 @@ void cmGlobalXCodeGenerator::addObject(cmXCodeObject* obj)
 cmXCodeObject* cmGlobalXCodeGenerator::CreateObject(
   cmXCodeObject::PBXType ptype)
 {
-  cmXCodeObject* obj;
-  if (this->XcodeVersion == 15) {
-    obj = new cmXCodeObject(ptype, cmXCodeObject::OBJECT);
-  } else {
-    obj = new cmXCode21Object(ptype, cmXCodeObject::OBJECT);
-  }
+  cmXCodeObject* obj = new cmXCode21Object(ptype, cmXCodeObject::OBJECT);
   this->addObject(obj);
   return obj;
 }
@@ -897,9 +877,6 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
   fileRef->AddAttribute("name", this->CreateString(name));
   fileRef->AddAttribute("path", this->CreateString(path));
   fileRef->AddAttribute("sourceTree", this->CreateString(sourceTree));
-  if (this->XcodeVersion == 15) {
-    fileRef->AddAttribute("refType", this->CreateString("4"));
-  }
   return fileRef;
 }
 
@@ -1564,9 +1541,7 @@ void cmGlobalXCodeGenerator::CreateCustomRulesMakefile(
   std::vector<cmCustomCommand> const& commands, const std::string& configName)
 {
   std::string makefileName = makefileBasename;
-  if (this->XcodeVersion > 20) {
-    makefileName += configName;
-  }
+  makefileName += configName;
   cmGeneratedFileStream makefileStream(makefileName.c_str());
   if (!makefileStream) {
     return;
@@ -1715,11 +1690,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
     defFlags, this->CurrentMakefile->GetDefineFlags());
 
   // Add preprocessor definitions for this target and configuration.
-  BuildObjectListOrString ppDefs(this, this->XcodeVersion >= 30);
-  if (this->XcodeVersion > 15) {
-    this->AppendDefines(
-      ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"");
-  }
+  BuildObjectListOrString ppDefs(this, true);
+  this->AppendDefines(
+    ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"");
   if (const char* exportMacro = gtgt->GetExportMacro()) {
     // Add the export symbol definition for shared library objects.
     this->AppendDefines(ppDefs, exportMacro);
@@ -1819,16 +1792,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
       gtgt->GetType() == cmStateEnums::SHARED_LIBRARY ||
       gtgt->GetType() == cmStateEnums::MODULE_LIBRARY ||
       gtgt->GetType() == cmStateEnums::EXECUTABLE) {
-    if (this->XcodeVersion >= 21) {
-      if (!gtgt->UsesDefaultOutputDir(configName,
-                                      cmStateEnums::RuntimeBinaryArtifact)) {
-        std::string pncdir = gtgt->GetDirectory(configName);
-        buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
-                                    this->CreateString(pncdir));
-      }
-    } else {
-      buildSettings->AddAttribute("OBJROOT", this->CreateString(pndir));
-      pndir = gtgt->GetDirectory(configName);
+    if (!gtgt->UsesDefaultOutputDir(configName,
+                                    cmStateEnums::RuntimeBinaryArtifact)) {
+      std::string pncdir = gtgt->GetDirectory(configName);
+      buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
+                                  this->CreateString(pncdir));
     }
 
     if (gtgt->IsFrameworkOnApple() || gtgt->IsCFBundleOnApple()) {
@@ -1844,16 +1812,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
     pnbase = gtgt->GetName();
     pnsuffix = ".a";
 
-    if (this->XcodeVersion >= 21) {
-      std::string pncdir = this->GetObjectsNormalDirectory(
-        this->CurrentProject, configName, gtgt);
-      buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
-                                  this->CreateString(pncdir));
-    } else {
-      buildSettings->AddAttribute("OBJROOT", this->CreateString(pndir));
-      pndir = this->GetObjectsNormalDirectory(this->CurrentProject, configName,
-                                              gtgt);
-    }
+    std::string pncdir =
+      this->GetObjectsNormalDirectory(this->CurrentProject, configName, gtgt);
+    buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR",
+                                this->CreateString(pncdir));
   }
 
   // Store the product name for all target types.
@@ -1922,7 +1884,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
           gtgt, "$(EXECUTABLE_NAME)", plist.c_str());
         buildSettings->AddAttribute("INFOPLIST_FILE",
                                     this->CreateString(plist));
-      } else if (this->XcodeVersion >= 22) {
+      } else {
         buildSettings->AddAttribute("MACH_O_TYPE",
                                     this->CreateString("mh_bundle"));
         buildSettings->AddAttribute("GCC_DYNAMIC_NO_PIC",
@@ -1934,14 +1896,6 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
           extraLinkOptions += " ";
           extraLinkOptions += createFlags;
         }
-      } else {
-        // Add the flags to create a module.
-        std::string createFlags = this->LookupFlags(
-          "CMAKE_SHARED_MODULE_CREATE_", llang, "_FLAGS", "-bundle");
-        if (!createFlags.empty()) {
-          extraLinkOptions += " ";
-          extraLinkOptions += createFlags;
-        }
       }
       break;
     }
@@ -2007,14 +1961,14 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
     default:
       break;
   }
-  if (this->XcodeVersion >= 22 && this->XcodeVersion < 40) {
+  if (this->XcodeVersion < 40) {
     buildSettings->AddAttribute("PREBINDING", this->CreateString("NO"));
   }
 
-  BuildObjectListOrString dirs(this, this->XcodeVersion >= 30);
-  BuildObjectListOrString fdirs(this, this->XcodeVersion >= 30);
-  BuildObjectListOrString sysdirs(this, this->XcodeVersion >= 30);
-  BuildObjectListOrString sysfdirs(this, this->XcodeVersion >= 30);
+  BuildObjectListOrString dirs(this, true);
+  BuildObjectListOrString fdirs(this, true);
+  BuildObjectListOrString sysdirs(this, true);
+  BuildObjectListOrString sysfdirs(this, true);
   const bool emitSystemIncludes = this->XcodeVersion >= 83;
 
   std::vector<std::string> includes;
@@ -2245,18 +2199,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
   buildSettings->AddAttribute("OTHER_REZFLAGS", this->CreateString(""));
   buildSettings->AddAttribute("SECTORDER_FLAGS", this->CreateString(""));
   buildSettings->AddAttribute("USE_HEADERMAP", this->CreateString("NO"));
-  if (this->XcodeVersion >= 30) {
-    cmXCodeObject* group = this->CreateObject(cmXCodeObject::OBJECT_LIST);
-    group->AddObject(this->CreateString("-Wmost"));
-    group->AddObject(this->CreateString("-Wno-four-char-constants"));
-    group->AddObject(this->CreateString("-Wno-unknown-pragmas"));
-    group->AddObject(this->CreateString("$(inherited)"));
-    buildSettings->AddAttribute("WARNING_CFLAGS", group);
-  } else {
-    buildSettings->AddAttribute(
-      "WARNING_CFLAGS", this->CreateString("-Wmost -Wno-four-char-constants"
-                                           " -Wno-unknown-pragmas"));
-  }
+  cmXCodeObject* group = this->CreateObject(cmXCodeObject::OBJECT_LIST);
+  group->AddObject(this->CreateString("-Wmost"));
+  group->AddObject(this->CreateString("-Wno-four-char-constants"));
+  group->AddObject(this->CreateString("-Wno-unknown-pragmas"));
+  group->AddObject(this->CreateString("$(inherited)"));
+  buildSettings->AddAttribute("WARNING_CFLAGS", group);
 
   // Runtime version information.
   if (gtgt->GetType() == cmStateEnums::SHARED_LIBRARY) {
@@ -2336,16 +2284,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
   this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0,
                              gtgt);
   target->AddAttribute("buildPhases", buildPhases);
-  if (this->XcodeVersion > 20) {
-    this->AddConfigurations(target, gtgt);
-  } else {
-    std::string theConfig =
-      this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
-    cmXCodeObject* buildSettings =
-      this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
-    this->CreateBuildSettings(gtgt, buildSettings, theConfig);
-    target->AddAttribute("buildSettings", buildSettings);
-  }
+  this->AddConfigurations(target, gtgt);
   cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST);
   target->AddAttribute("dependencies", dependencies);
   target->AddAttribute("name", this->CreateString(gtgt->GetName()));
@@ -2447,8 +2386,7 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(
       else if (target->IsCFBundleOnApple())
         return "wrapper.plug-in";
       else
-        return ((this->XcodeVersion >= 22) ? "compiled.mach-o.executable"
-                                           : "compiled.mach-o.dylib");
+        return "compiled.mach-o.executable";
     case cmStateEnums::SHARED_LIBRARY:
       return (target->GetPropertyAsBool("FRAMEWORK")
                 ? "wrapper.framework"
@@ -2481,9 +2419,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(
       else if (target->IsCFBundleOnApple())
         return "com.apple.product-type.bundle";
       else
-        return ((this->XcodeVersion >= 22)
-                  ? "com.apple.product-type.tool"
-                  : "com.apple.product-type.library.dynamic");
+        return "com.apple.product-type.tool";
     case cmStateEnums::SHARED_LIBRARY:
       return (target->GetPropertyAsBool("FRAMEWORK")
                 ? "com.apple.product-type.framework"
@@ -2509,15 +2445,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
   cmXCodeObject* buildRules = this->CreateObject(cmXCodeObject::OBJECT_LIST);
   target->AddAttribute("buildRules", buildRules);
   std::string defConfig;
-  if (this->XcodeVersion > 20) {
-    defConfig = this->AddConfigurations(target, gtgt);
-  } else {
-    cmXCodeObject* buildSettings =
-      this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
-    defConfig = this->CurrentMakefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
-    this->CreateBuildSettings(gtgt, buildSettings, defConfig);
-    target->AddAttribute("buildSettings", buildSettings);
-  }
+  defConfig = this->AddConfigurations(target, gtgt);
   cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST);
   target->AddAttribute("dependencies", dependencies);
   target->AddAttribute("name", this->CreateString(gtgt->GetName()));
@@ -2536,9 +2464,6 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
     fullName = gtgt->GetFullName(defConfig);
   }
   fileRef->AddAttribute("path", this->CreateString(fullName));
-  if (this->XcodeVersion == 15) {
-    fileRef->AddAttribute("refType", this->CreateString("0"));
-  }
   fileRef->AddAttribute("sourceTree",
                         this->CreateString("BUILT_PRODUCTS_DIR"));
   fileRef->SetComment(gtgt->GetName());
@@ -2639,32 +2564,25 @@ void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(
   cmXCodeObject* target, const char* attribute, const char* value,
   const std::string& configName)
 {
-  if (this->XcodeVersion < 21) {
-    // There is only one configuration.  Add the setting to the buildSettings
-    // of the target.
-    this->AppendOrAddBuildSetting(target->GetObject("buildSettings"),
-                                  attribute, value);
-  } else {
-    // There are multiple configurations.  Add the setting to the
-    // buildSettings of the configuration name given.
-    cmXCodeObject* configurationList =
-      target->GetObject("buildConfigurationList")->GetObject();
-    cmXCodeObject* buildConfigs =
-      configurationList->GetObject("buildConfigurations");
-    std::vector<cmXCodeObject*> list = buildConfigs->GetObjectList();
-    // each configuration and the target itself has a buildSettings in it
-    // list.push_back(target);
-    for (std::vector<cmXCodeObject*>::iterator i = list.begin();
-         i != list.end(); ++i) {
-      if (!configName.empty()) {
-        if ((*i)->GetObject("name")->GetString() == configName) {
-          cmXCodeObject* settings = (*i)->GetObject("buildSettings");
-          this->AppendOrAddBuildSetting(settings, attribute, value);
-        }
-      } else {
+  // There are multiple configurations.  Add the setting to the
+  // buildSettings of the configuration name given.
+  cmXCodeObject* configurationList =
+    target->GetObject("buildConfigurationList")->GetObject();
+  cmXCodeObject* buildConfigs =
+    configurationList->GetObject("buildConfigurations");
+  std::vector<cmXCodeObject*> list = buildConfigs->GetObjectList();
+  // each configuration and the target itself has a buildSettings in it
+  // list.push_back(target);
+  for (std::vector<cmXCodeObject*>::iterator i = list.begin(); i != list.end();
+       ++i) {
+    if (!configName.empty()) {
+      if ((*i)->GetObject("name")->GetString() == configName) {
         cmXCodeObject* settings = (*i)->GetObject("buildSettings");
         this->AppendOrAddBuildSetting(settings, attribute, value);
       }
+    } else {
+      cmXCodeObject* settings = (*i)->GetObject("buildSettings");
+      this->AppendOrAddBuildSetting(settings, attribute, value);
     }
   }
 }
@@ -2744,13 +2662,11 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
       for (std::vector<std::string>::const_iterator libDir = libDirs.begin();
            libDir != libDirs.end(); ++libDir) {
         if (libDir->size() && *libDir != "/usr/lib") {
-          if (this->XcodeVersion > 15) {
-            // Now add the same one but append
-            // $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to it:
-            linkDirs += " ";
-            linkDirs += this->XCodeEscapePath(
-              *libDir + "/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)");
-          }
+          // Now add the same one but append
+          // $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to it:
+          linkDirs += " ";
+          linkDirs += this->XCodeEscapePath(
+            *libDir + "/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)");
           linkDirs += " ";
           linkDirs += this->XCodeEscapePath(*libDir);
         }
@@ -2852,9 +2768,6 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreatePBXGroup(cmXCodeObject* parent,
     this->CreateObject(cmXCodeObject::OBJECT_LIST);
   group->AddAttribute("name", this->CreateString(name));
   group->AddAttribute("children", groupChildren);
-  if (this->XcodeVersion == 15) {
-    group->AddAttribute("refType", this->CreateString("4"));
-  }
   group->AddAttribute("sourceTree", this->CreateString("<group>"));
   if (parentChildren)
     parentChildren->AddObject(group);
@@ -2953,50 +2866,28 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
   this->MainGroupChildren = 0;
   cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
   group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
-  cmXCodeObject* developBuildStyle =
-    this->CreateObject(cmXCodeObject::PBXBuildStyle);
   cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
-  if (this->XcodeVersion == 15) {
-    developBuildStyle->AddAttribute("name", this->CreateString("Development"));
-    developBuildStyle->AddAttribute("buildSettings", group);
-    listObjs->AddObject(developBuildStyle);
-    group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
-    group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("YES"));
-    cmXCodeObject* deployBuildStyle =
+  for (unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) {
+    cmXCodeObject* buildStyle =
       this->CreateObject(cmXCodeObject::PBXBuildStyle);
-    deployBuildStyle->AddAttribute("name", this->CreateString("Deployment"));
-    deployBuildStyle->AddAttribute("buildSettings", group);
-    listObjs->AddObject(deployBuildStyle);
-  } else {
-    for (unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) {
-      cmXCodeObject* buildStyle =
-        this->CreateObject(cmXCodeObject::PBXBuildStyle);
-      const char* name = this->CurrentConfigurationTypes[i].c_str();
-      buildStyle->AddAttribute("name", this->CreateString(name));
-      buildStyle->SetComment(name);
-      cmXCodeObject* sgroup =
-        this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
-      sgroup->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
-      buildStyle->AddAttribute("buildSettings", sgroup);
-      listObjs->AddObject(buildStyle);
-    }
+    const char* name = this->CurrentConfigurationTypes[i].c_str();
+    buildStyle->AddAttribute("name", this->CreateString(name));
+    buildStyle->SetComment(name);
+    cmXCodeObject* sgroup = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
+    sgroup->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
+    buildStyle->AddAttribute("buildSettings", sgroup);
+    listObjs->AddObject(buildStyle);
   }
 
   cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup);
   this->MainGroupChildren = this->CreateObject(cmXCodeObject::OBJECT_LIST);
   mainGroup->AddAttribute("children", this->MainGroupChildren);
-  if (this->XcodeVersion == 15) {
-    mainGroup->AddAttribute("refType", this->CreateString("4"));
-  }
   mainGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
 
   cmXCodeObject* sourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup);
   this->SourcesGroupChildren = this->CreateObject(cmXCodeObject::OBJECT_LIST);
   sourcesGroup->AddAttribute("name", this->CreateString("Sources"));
   sourcesGroup->AddAttribute("children", this->SourcesGroupChildren);
-  if (this->XcodeVersion == 15) {
-    sourcesGroup->AddAttribute("refType", this->CreateString("4"));
-  }
   sourcesGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
   this->MainGroupChildren->AddObject(sourcesGroup);
 
@@ -3005,9 +2896,6 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
     this->CreateObject(cmXCodeObject::OBJECT_LIST);
   resourcesGroup->AddAttribute("name", this->CreateString("Resources"));
   resourcesGroup->AddAttribute("children", this->ResourcesGroupChildren);
-  if (this->XcodeVersion == 15) {
-    resourcesGroup->AddAttribute("refType", this->CreateString("4"));
-  }
   resourcesGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
   this->MainGroupChildren->AddObject(resourcesGroup);
 
@@ -3018,9 +2906,6 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
 
   cmXCodeObject* productGroup = this->CreateObject(cmXCodeObject::PBXGroup);
   productGroup->AddAttribute("name", this->CreateString("Products"));
-  if (this->XcodeVersion == 15) {
-    productGroup->AddAttribute("refType", this->CreateString("4"));
-  }
   productGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
   cmXCodeObject* productGroupChildren =
     this->CreateObject(cmXCodeObject::OBJECT_LIST);
@@ -3042,24 +2927,22 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
   this->RootObject->AddAttribute("buildStyles", listObjs);
   this->RootObject->AddAttribute("hasScannedForEncodings",
                                  this->CreateString("0"));
-  if (this->XcodeVersion >= 30) {
-    group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
-    group->AddAttribute("BuildIndependentTargetsInParallel",
-                        this->CreateString("YES"));
-    std::ostringstream v;
-    v << std::setfill('0') << std::setw(4) << XcodeVersion * 10;
-    group->AddAttribute("LastUpgradeCheck", this->CreateString(v.str()));
-    this->RootObject->AddAttribute("attributes", group);
-    if (this->XcodeVersion >= 32)
-      this->RootObject->AddAttribute("compatibilityVersion",
-                                     this->CreateString("Xcode 3.2"));
-    else if (this->XcodeVersion >= 31)
-      this->RootObject->AddAttribute("compatibilityVersion",
-                                     this->CreateString("Xcode 3.1"));
-    else
-      this->RootObject->AddAttribute("compatibilityVersion",
-                                     this->CreateString("Xcode 3.0"));
-  }
+  group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
+  group->AddAttribute("BuildIndependentTargetsInParallel",
+                      this->CreateString("YES"));
+  std::ostringstream v;
+  v << std::setfill('0') << std::setw(4) << XcodeVersion * 10;
+  group->AddAttribute("LastUpgradeCheck", this->CreateString(v.str()));
+  this->RootObject->AddAttribute("attributes", group);
+  if (this->XcodeVersion >= 32)
+    this->RootObject->AddAttribute("compatibilityVersion",
+                                   this->CreateString("Xcode 3.2"));
+  else if (this->XcodeVersion >= 31)
+    this->RootObject->AddAttribute("compatibilityVersion",
+                                   this->CreateString("Xcode 3.1"));
+  else
+    this->RootObject->AddAttribute("compatibilityVersion",
+                                   this->CreateString("Xcode 3.0"));
   // Point Xcode at the top of the source tree.
   {
     std::string pdir =
@@ -3074,26 +2957,15 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
   typedef std::vector<std::pair<std::string, cmXCodeObject*> > Configs;
   Configs configs;
   const char* defaultConfigName = "Debug";
-  if (this->XcodeVersion == 15) {
-    cmXCodeObject* configDebug =
-      this->CreateObject(cmXCodeObject::XCBuildConfiguration);
-    configDebug->AddAttribute("name", this->CreateString("Debug"));
-    configs.push_back(std::make_pair("Debug", configDebug));
-    cmXCodeObject* configRelease =
-      this->CreateObject(cmXCodeObject::XCBuildConfiguration);
-    configRelease->AddAttribute("name", this->CreateString("Release"));
-    configs.push_back(std::make_pair("Release", configRelease));
-  } else {
-    for (unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) {
-      const char* name = this->CurrentConfigurationTypes[i].c_str();
-      if (0 == i) {
-        defaultConfigName = name;
-      }
-      cmXCodeObject* config =
-        this->CreateObject(cmXCodeObject::XCBuildConfiguration);
-      config->AddAttribute("name", this->CreateString(name));
-      configs.push_back(std::make_pair(name, config));
+  for (unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) {
+    const char* name = this->CurrentConfigurationTypes[i].c_str();
+    if (0 == i) {
+      defaultConfigName = name;
     }
+    cmXCodeObject* config =
+      this->CreateObject(cmXCodeObject::XCBuildConfiguration);
+    config->AddAttribute("name", this->CreateString(name));
+    configs.push_back(std::make_pair(name, config));
   }
   for (Configs::iterator c = configs.begin(); c != configs.end(); ++c) {
     buildConfigurations->AddObject(c->second);
@@ -3250,22 +3122,12 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf)
 
 void cmGlobalXCodeGenerator::ComputeObjectDirArch()
 {
-  if (this->XcodeVersion >= 21) {
-    if (this->Architectures.size() > 1) {
-      this->ObjectDirArch = "$(CURRENT_ARCH)";
-    } else if (!this->Architectures.empty()) {
-      this->ObjectDirArch = this->Architectures[0];
-    } else {
-      this->ObjectDirArch = this->ObjectDirArchDefault;
-    }
+  if (this->Architectures.size() > 1) {
+    this->ObjectDirArch = "$(CURRENT_ARCH)";
+  } else if (!this->Architectures.empty()) {
+    this->ObjectDirArch = this->Architectures[0];
   } else {
-#if defined(__ppc__)
-    this->ObjectDirArch = "ppc";
-#elif defined(__i386)
-    this->ObjectDirArch = "i386";
-#else
-    this->ObjectDirArch = "";
-#endif
+    this->ObjectDirArch = this->ObjectDirArchDefault;
   }
 }
 
@@ -3435,10 +3297,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject(
   std::string xcodeDir = root->GetCurrentBinaryDirectory();
   xcodeDir += "/";
   xcodeDir += root->GetProjectName();
-  xcodeDir += ".xcode";
-  if (this->XcodeVersion > 20) {
-    xcodeDir += "proj";
-  }
+  xcodeDir += ".xcodeproj";
   cmSystemTools::MakeDirectory(xcodeDir.c_str());
   std::string xcodeProjFile = xcodeDir + "/project.pbxproj";
   cmGeneratedFileStream fout(xcodeProjFile.c_str());
@@ -3527,20 +3386,13 @@ void cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
   cmXCodeObject::Indent(1, fout);
   fout << "};\n";
   cmXCodeObject::Indent(1, fout);
-  if (this->XcodeVersion >= 21) {
-    if (this->XcodeVersion >= 32)
-      fout << "objectVersion = 46;\n";
-    else if (this->XcodeVersion >= 31)
-      fout << "objectVersion = 45;\n";
-    else if (this->XcodeVersion >= 30)
-      fout << "objectVersion = 44;\n";
-    else
-      fout << "objectVersion = 42;\n";
-    cmXCode21Object::PrintList(this->XCodeObjects, fout);
-  } else {
-    fout << "objectVersion = 39;\n";
-    cmXCodeObject::PrintList(this->XCodeObjects, fout);
-  }
+  if (this->XcodeVersion >= 32)
+    fout << "objectVersion = 46;\n";
+  else if (this->XcodeVersion >= 31)
+    fout << "objectVersion = 45;\n";
+  else
+    fout << "objectVersion = 44;\n";
+  cmXCode21Object::PrintList(this->XCodeObjects, fout);
   cmXCodeObject::Indent(1, fout);
   fout << "rootObject = " << this->RootObject->GetId()
        << " /* Project object */;\n";
@@ -3549,9 +3401,7 @@ void cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
 
 const char* cmGlobalXCodeGenerator::GetCMakeCFGIntDir() const
 {
-  return this->XcodeVersion >= 21
-    ? "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"
-    : ".";
+  return "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
 }
 
 std::string cmGlobalXCodeGenerator::ExpandCFGIntDir(
@@ -3614,12 +3464,10 @@ void cmGlobalXCodeGenerator::AppendDirectoryForConfig(
   const std::string& prefix, const std::string& config,
   const std::string& suffix, std::string& dir)
 {
-  if (this->XcodeVersion > 20) {
-    if (!config.empty()) {
-      dir += prefix;
-      dir += config;
-      dir += suffix;
-    }
+  if (!config.empty()) {
+    dir += prefix;
+    dir += config;
+    dir += suffix;
   }
 }
 
@@ -3744,11 +3592,6 @@ std::string cmGlobalXCodeGenerator::ComputeInfoPListLocation(
 // i.e. "Can I build Debug and Release in the same tree?"
 bool cmGlobalXCodeGenerator::IsMultiConfig() const
 {
-  // Old Xcode 1.5 is single config:
-  if (this->XcodeVersion == 15) {
-    return false;
-  }
-
   // Newer Xcode versions are multi config:
   return true;
 }
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt
index d680205..d1a1df5 100644
--- a/Tests/CMakeLib/CMakeLists.txt
+++ b/Tests/CMakeLib/CMakeLists.txt
@@ -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()
diff --git a/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt
index c53befc..7c84ee1 100644
--- a/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt
+++ b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt
@@ -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()
diff --git a/Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt
index 3a45bfe..e47b9db 100644
--- a/Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt
+++ b/Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt
@@ -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()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 32c4be8..90422a3 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -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
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index db344ef..82e903d 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
 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)
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index f6449f2..f89100e 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -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)
diff --git a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake
index 4416ef9..bb55a6e 100644
--- a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake
+++ b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake
@@ -1,6 +1,6 @@
 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()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ece4f647491eb81d3be55881a47752ce4ff88da9
commit ece4f647491eb81d3be55881a47752ce4ff88da9
Author:     Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Fri Apr 21 20:02:20 2017 +0200
Commit:     Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Fri Apr 21 20:02:20 2017 +0200

    FindMPI: Modernize documentation

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 5f64855..fab53cb 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -10,77 +10,78 @@
 # The Message Passing Interface (MPI) is a library used to write
 # high-performance distributed-memory parallel applications, and is
 # typically deployed on a cluster.  MPI is a standard interface (defined
-# by the MPI forum) for which many implementations are available.  All
-# of them have somewhat different include paths, libraries to link
-# against, etc., and this module tries to smooth out those differences.
+# by the MPI forum) for which many implementations are available.
 #
 # Variables
 # ^^^^^^^^^
 #
 # This module will set the following variables per language in your
-# project, where <lang> is one of C, CXX, or Fortran:
-#
-# ::
-#
-#    MPI_<lang>_FOUND           TRUE if FindMPI found MPI flags for <lang>
-#    MPI_<lang>_COMPILER        MPI Compiler wrapper for <lang>
-#    MPI_<lang>_COMPILE_FLAGS   Compilation flags for MPI programs
-#    MPI_<lang>_INCLUDE_PATH    Include path(s) for MPI header
-#    MPI_<lang>_LINK_FLAGS      Linking flags for MPI programs
-#    MPI_<lang>_LIBRARIES       All libraries to link MPI programs against
+# project, where ``<lang>`` is one of C, CXX, or Fortran:
+#
+# ``MPI_<lang>_FOUND``
+#   Variable indicating the MPI settings for ``<lang>`` were found.
+# ``MPI_<lang>_COMPILER``
+#   MPI Compiler wrapper for ``<lang>``.
+# ``MPI_<lang>_COMPILE_FLAGS``
+#   Compilation flags for MPI programs, separated by spaces.
+#   This is *not* a :ref:`;-list <CMake Language Lists>`.
+# ``MPI_<lang>_INCLUDE_PATH``
+#   Include path(s) for MPI header.
+# ``MPI_<lang>_LINK_FLAGS``
+#   Linker flags for MPI programs.
+# ``MPI_<lang>_LIBRARIES``
+#   All libraries to link MPI programs against.
 #
 # Additionally, the following :prop_tgt:`IMPORTED` targets are defined:
 #
-# ::
-#
-#    MPI::MPI_<lang>            Target for using MPI from <lang>
+# ``MPI::MPI_<lang>``
+#   Target for using MPI from ``<lang>``.
 #
 # Additionally, FindMPI sets the following variables for running MPI
 # programs from the command line:
 #
-# ::
-#
-#    MPIEXEC                    Executable for running MPI programs
-#    MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving
-#                               it the number of processors to run on
-#    MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly
-#                               before the executable to run.
-#    MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after other flags
+# ``MPIEXEC``
+#   Executable for running MPI programs, if provided.
+# ``MPIEXEC_NUMPROC_FLAG``
+#   Flag to pass to ``MPIEXEC`` before giving it the number of processors to run on.
+# ``MPIEXEC_MAX_NUMPROCS``
+#   Number of MPI processors to utilize. Defaults to the number
+#   of processors detected on the host system.
+# ``MPIEXEC_PREFLAGS``
+#   Flags to pass to ``MPIEXEC`` directly before the executable to run.
+# ``MPIEXEC_POSTFLAGS``
+#   Flags to pass to ``MPIEXEC`` after other flags.
 #
 # Usage
 # ^^^^^
 #
-# To use this module, simply call FindMPI from a CMakeLists.txt file, or
-# run ``find_package(MPI)``, then run CMake.  If you are happy with the
+# To use this module, call ``find_package(MPI)``.  If you are happy with the
 # auto-detected configuration for your language, then you're done.  If
 # not, you have two options:
 #
-# ::
-#
-#    1. Set MPI_<lang>_COMPILER to the MPI wrapper (mpicc, etc.) of your
-#       choice and reconfigure.  FindMPI will attempt to determine all the
-#       necessary variables using THAT compiler's compile and link flags.
-#    2. If this fails, or if your MPI implementation does not come with
-#       a compiler wrapper, then set both MPI_<lang>_LIBRARIES and
-#       MPI_<lang>_INCLUDE_PATH.  You may also set any other variables
-#       listed above, but these two are required.  This will circumvent
-#       autodetection entirely.
+# 1. Set ``MPI_<lang>_COMPILER`` to the MPI wrapper (e.g. ``mpicc``) of your
+#    choice and reconfigure.  FindMPI will attempt to determine all the
+#    necessary variables using *that* compiler's compile and link flags.
+# 2. If this fails, or if your MPI implementation does not come with
+#    a compiler wrapper, then set both ``MPI_<lang>_LIBRARIES`` and
+#    ``MPI_<lang>_INCLUDE_PATH``.  You may also set any other variables
+#    listed above, but these two are required.  This will circumvent
+#    autodetection entirely.
 #
 # When configuration is successful, ``MPI_<lang>_COMPILER`` will be set to
-# the compiler wrapper for <lang>, if it was found.  ``MPI_<lang>_FOUND``
+# the compiler wrapper for ``<lang>``, if it was found. ``MPI_<lang>_FOUND``
 # and other variables above will be set if any MPI implementation was
-# found for <lang>, regardless of whether a compiler was found.
+# found for ``<lang>``, regardless of whether a compiler was found.
 #
 # When using ``MPIEXEC`` to execute MPI applications, you should typically
 # use all of the ``MPIEXEC`` flags as follows:
 #
 # ::
 #
-#    ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS
+#    ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS}
 #      ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS
 #
-# where ``PROCS`` is the number of processors on which to execute the
-# program, ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to
+# where ``EXECUTABLE`` is the MPI program, and ``ARGS`` are the arguments to
 # pass to the MPI program.
 #
 # Backward Compatibility
@@ -106,12 +107,12 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 # The compilers are detected in this order:
 #
 # 1. Try to find the most generic available MPI compiler, as this is usually set up by
-#    cluster admins.  e.g., if plain old mpicc is available, we'll use it and assume it's
+#    cluster admins, e.g. if plain old mpicc is available, we'll use it and assume it's
 #    the right compiler.
 #
 # 2. If a generic mpicc is NOT found, then we attempt to find one that matches
 #    CMAKE_<lang>_COMPILER_ID. e.g. if you are using XL compilers, we'll try to find mpixlc
-#    and company, but not mpiicc.  This hopefully prevents toolchain mismatches.
+#    and company, but not mpiicc. This hopefully prevents toolchain mismatches.
 #
 # If you want to force a particular MPI compiler other than what we autodetect (e.g. if you
 # want to compile regular stuff with GNU and parallel stuff with Intel), you can always set
@@ -482,7 +483,7 @@ function (interrogate_mpi_compiler lang try_libs)
     set(MPI_${lang}_LIBRARIES     ${MPI_LIBRARIES_WORK}     CACHE STRING "MPI ${lang} libraries to link against" FORCE)
     mark_as_advanced(MPI_${lang}_COMPILE_FLAGS MPI_${lang}_INCLUDE_PATH MPI_${lang}_LINK_FLAGS MPI_${lang}_LIBRARIES)
 
-    # clear out our temporary lib/header detectionv variable here.
+    # clear out our temporary lib/header detection variable here.
     set(MPI_LIB         "MPI_LIB-NOTFOUND"         CACHE INTERNAL "Scratch variable for MPI lib detection"    FORCE)
     set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI header detection" FORCE)
   endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d4fa0210e49c29ab0f159b069174aa7d310b978
commit 6d4fa0210e49c29ab0f159b069174aa7d310b978
Author:     Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Fri Apr 21 20:01:37 2017 +0200
Commit:     Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Fri Apr 21 20:01:37 2017 +0200

    FindMPI: MPIEXEC handling improvements

diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 3e8be5b..5f64855 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -552,10 +552,21 @@ find_program(MPIEXEC
 get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH)
 get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH)
 
-set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
+# According to the MPI standard, section 8.8 -n is a guaranteed, and the only guaranteed way to
+# launch an MPI process using mpiexec if such a program exists.
+set(MPIEXEC_NUMPROC_FLAG "-n"  CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
 set(MPIEXEC_PREFLAGS     ""    CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
 set(MPIEXEC_POSTFLAGS    ""    CACHE STRING "These flags will come after all flags given to MPIEXEC.")
-set(MPIEXEC_MAX_NUMPROCS "2"   CACHE STRING "Maximum number of processors available to run MPI applications.")
+
+# Set the number of processes to the processor count and the previous default
+# of 2 if that couldn't be determined.
+include(${CMAKE_CURRENT_LIST_DIR}/ProcessorCount.cmake)
+ProcessorCount(_MPIEXEC_NUMPROCS)
+if("${_MPIEXEC_NUMPROCS}" EQUAL "0")
+  set(_MPIEXEC_NUMPROCS 2)
+endif()
+set(MPIEXEC_MAX_NUMPROCS "${_MPIEXEC_NUMPROCS}"   CACHE STRING "Maximum number of processors available to run MPI applications.")
+unset(_MPIEXEC_NUMPROCS)
 mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
 
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81f9c9e892e6b4ee873361b3750a87760ebe8a2d
commit 81f9c9e892e6b4ee873361b3750a87760ebe8a2d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 21 13:41:09 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 21 13:45:45 2017 -0400

    Deprecate Visual Studio 8 2005 generator
    
    Update documentation to mark the generator deprecated.  Add a warning at
    the end of generation plus an option to turn off the warning.

diff --git a/Help/generator/Visual Studio 8 2005.rst b/Help/generator/Visual Studio 8 2005.rst
index 29012c3..acbbf01 100644
--- a/Help/generator/Visual Studio 8 2005.rst	
+++ b/Help/generator/Visual Studio 8 2005.rst	
@@ -1,7 +1,14 @@
 Visual Studio 8 2005
 --------------------
 
-Generates Visual Studio 8 2005 project files.
+Deprecated.  Generates Visual Studio 8 2005 project files.
+
+.. note::
+  This generator is deprecated and will be removed in a future version
+  of CMake.  It will still be possible to build with VS 8 2005 tools
+  using the :generator:`Visual Studio 10 2010` (or above) generator
+  with :variable:`CMAKE_GENERATOR_TOOLSET` set to ``v80``, or by
+  using the :generator:`NMake Makefiles` generator.
 
 The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
 to specify a target platform name.
diff --git a/Help/release/dev/vs8-deprecate.rst b/Help/release/dev/vs8-deprecate.rst
new file mode 100644
index 0000000..97d996f
--- /dev/null
+++ b/Help/release/dev/vs8-deprecate.rst
@@ -0,0 +1,5 @@
+vs8-deprecate
+-------------
+
+* The :generator:`Visual Studio 8 2005` generator is now deprecated
+  and will be removed in a future version of CMake.
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 14ec72f..1b75a08 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -293,6 +293,19 @@ void cmGlobalVisualStudio7Generator::Generate()
   if (!cmSystemTools::GetErrorOccuredFlag()) {
     this->CallVisualStudioMacro(MacroReload);
   }
+
+  if (this->Version == VS8 && !this->CMakeInstance->GetIsInTryCompile()) {
+    const char* cmakeWarnVS8 =
+      this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS8");
+    if (!cmakeWarnVS8 || !cmSystemTools::IsOff(cmakeWarnVS8)) {
+      this->CMakeInstance->IssueMessage(
+        cmake::WARNING,
+        "The \"Visual Studio 8 2005\" generator is deprecated "
+        "and will be removed in a future version of CMake."
+        "\n"
+        "Add CMAKE_WARN_VS8=OFF to the cache to disable this warning.");
+    }
+  }
 }
 
 void cmGlobalVisualStudio7Generator::OutputSLNFile(
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 1fcb5ac..7a42b72 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -54,7 +54,7 @@ public:
   void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs8generatorName) + " [arch]";
-    entry.Brief = "Generates Visual Studio 2005 project files.  "
+    entry.Brief = "Deprecated.  Generates Visual Studio 2005 project files.  "
                   "Optional [arch] can be \"Win64\".";
   }
 
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt
new file mode 100644
index 0000000..2f2cbd3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+  The "Visual Studio 8 2005" generator is deprecated and will be removed in a
+  future version of CMake.
+
+  Add CMAKE_WARN_VS8=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index f327f78..f94b10a 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -78,6 +78,13 @@ if(RunCMake_GENERATOR STREQUAL "Ninja")
   unset(RunCMake_TEST_NO_CLEAN)
 endif()
 
+if(RunCMake_GENERATOR MATCHES "^Visual Studio 8 2005")
+  set(RunCMake_WARN_VS8 1)
+  run_cmake(DeprecateVS8-WARN-ON)
+  unset(RunCMake_WARN_VS8)
+  run_cmake(DeprecateVS8-WARN-OFF)
+endif()
+
 if(UNIX)
   run_cmake_command(E_create_symlink-no-arg
     ${CMAKE_COMMAND} -E create_symlink
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 04eadd5..26312c4 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -51,6 +51,9 @@ function(run_cmake test)
   if(APPLE)
     list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
   endif()
+  if(RunCMake_GENERATOR MATCHES "^Visual Studio 8 2005" AND NOT RunCMake_WARN_VS8)
+    list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_WARN_VS8=OFF)
+  endif()
   if(RunCMake_MAKE_PROGRAM)
     list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")
   endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eaf53849ec760ecc1000ab6f56519f203c9b4ff5
commit eaf53849ec760ecc1000ab6f56519f203c9b4ff5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 21 13:08:30 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 21 13:10:28 2017 -0400

    Xcode: Compute version number earlier

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 4213751..8968bb2 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -133,16 +133,12 @@ public:
   bool SupportsPlatform() const CM_OVERRIDE { return false; }
 };
 
-cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,
-                                               std::string const& version)
+cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(
+  cmake* cm, std::string const& version_string, unsigned int version_number)
   : cmGlobalGenerator(cm)
 {
-  this->VersionString = version;
-
-  // Compute an integer form of the version number.
-  unsigned int v[2] = { 0, 0 };
-  sscanf(this->VersionString.c_str(), "%u.%u", &v[0], &v[1]);
-  this->XcodeVersion = 10 * v[0] + v[1];
+  this->VersionString = version_string;
+  this->XcodeVersion = version_number;
 
   this->RootObject = 0;
   this->MainGroupChildren = 0;
@@ -189,8 +185,15 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
     parser.ParseFile(
       "/Developer/Applications/Xcode.app/Contents/version.plist");
   }
+  std::string const& version_string = parser.Version;
+
+  // Compute an integer form of the version number.
+  unsigned int v[2] = { 0, 0 };
+  sscanf(version_string.c_str(), "%u.%u", &v[0], &v[1]);
+  unsigned int version_number = 10 * v[0] + v[1];
+
   CM_AUTO_PTR<cmGlobalXCodeGenerator> gg(
-    new cmGlobalXCodeGenerator(cm, parser.Version));
+    new cmGlobalXCodeGenerator(cm, version_string, version_number));
   if (gg->XcodeVersion == 20) {
     cmSystemTools::Message("Xcode 2.0 not really supported by cmake, "
                            "using Xcode 15 generator\n");
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index a733d5c..ee06074 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -32,7 +32,8 @@ struct cmDocumentationEntry;
 class cmGlobalXCodeGenerator : public cmGlobalGenerator
 {
 public:
-  cmGlobalXCodeGenerator(cmake* cm, std::string const& version);
+  cmGlobalXCodeGenerator(cmake* cm, std::string const& version_string,
+                         unsigned int version_number);
   static cmGlobalGeneratorFactory* NewFactory();
 
   ///! Get the name for the generator.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d1bd0111447909bec0582e8c0128a427a5eeaba
commit 3d1bd0111447909bec0582e8c0128a427a5eeaba
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Apr 21 09:50:04 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Apr 21 13:03:01 2017 -0400

    cmCTestTestHandler: use pointers to static memory
    
    There's no need to reserve 100 bytes for each of these strings.

diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index dafeec2..167fecf 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1633,10 +1633,10 @@ void cmCTestTestHandler::UseExcludeRegExp()
 
 const char* cmCTestTestHandler::GetTestStatus(int status)
 {
-  static const char statuses[][100] = {
-    "Not Run",   "Timeout",     "SEGFAULT", "ILLEGAL",     "INTERRUPT",
-    "NUMERICAL", "OTHER_FAULT", "Failed",   "BAD_COMMAND", "Completed"
-  };
+  static const char* statuses[] = { "Not Run",     "Timeout",   "SEGFAULT",
+                                    "ILLEGAL",     "INTERRUPT", "NUMERICAL",
+                                    "OTHER_FAULT", "Failed",    "BAD_COMMAND",
+                                    "Completed" };
 
   if (status < cmCTestTestHandler::NOT_RUN ||
       status > cmCTestTestHandler::COMPLETED) {

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5969048d1dbd531902f187699e47754115274564
commit 5969048d1dbd531902f187699e47754115274564
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Apr 21 09:31:36 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Apr 21 13:03:00 2017 -0400

    cmCTestTestCommand: defer getting the global timeout

diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index a756188..21b1003 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -33,10 +33,11 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
   const char* ctestTimeout =
     this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT");
 
-  double timeout = this->CTest->GetTimeOut();
+  double timeout;
   if (ctestTimeout) {
     timeout = atof(ctestTimeout);
   } else {
+    timeout = this->CTest->GetTimeOut();
     if (timeout <= 0) {
       // By default use timeout of 10 minutes
       timeout = 600;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0bee006602f07e26d052ba30541e6ce61a621b63
commit 0bee006602f07e26d052ba30541e6ce61a621b63
Author:     Matthew Woehlke <matthew.woehlke at kitware.com>
AuthorDate: Thu Apr 20 15:11:27 2017 -0400
Commit:     Matthew Woehlke <matthew.woehlke at kitware.com>
CommitDate: Fri Apr 21 10:51:09 2017 -0400

    Tests: Test namespaces with exported JARs

diff --git a/Tests/JavaExportImport/BuildExport/CMakeLists.txt b/Tests/JavaExportImport/BuildExport/CMakeLists.txt
index 953f9d0..fa7e501 100644
--- a/Tests/JavaExportImport/BuildExport/CMakeLists.txt
+++ b/Tests/JavaExportImport/BuildExport/CMakeLists.txt
@@ -7,4 +7,7 @@ find_package(Java COMPONENTS Development)
 include(UseJava)
 
 add_jar(${PROJECT_NAME} Foo.java)
-export_jars(TARGETS ${PROJECT_NAME} FILE JavaBuildExportTestConfig.cmake)
+export_jars(
+  TARGETS ${PROJECT_NAME}
+  NAMESPACE foo::
+  FILE JavaBuildExportTestConfig.cmake)
diff --git a/Tests/JavaExportImport/Import/CMakeLists.txt b/Tests/JavaExportImport/Import/CMakeLists.txt
index 79a1447..13ec05d 100644
--- a/Tests/JavaExportImport/Import/CMakeLists.txt
+++ b/Tests/JavaExportImport/Import/CMakeLists.txt
@@ -11,4 +11,4 @@ find_package(JavaInstallExportTest REQUIRED)
 
 add_jar(${PROJECT_NAME}
   SOURCES Import.java
-  INCLUDE_JARS foo bar)
+  INCLUDE_JARS foo::foo bar::bar)
diff --git a/Tests/JavaExportImport/InstallExport/CMakeLists.txt b/Tests/JavaExportImport/InstallExport/CMakeLists.txt
index 0a9afd9..2923beb 100644
--- a/Tests/JavaExportImport/InstallExport/CMakeLists.txt
+++ b/Tests/JavaExportImport/InstallExport/CMakeLists.txt
@@ -10,5 +10,6 @@ add_jar(${PROJECT_NAME} Bar.java)
 install_jar(${PROJECT_NAME} DESTINATION share/java)
 install_jar_exports(
   TARGETS ${PROJECT_NAME}
+  NAMESPACE bar::
   FILE JavaInstallExportTestConfig.cmake
   DESTINATION share/cmake)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=789c8de3df0c18fe8b0912286e4c1810542a79e9
commit 789c8de3df0c18fe8b0912286e4c1810542a79e9
Author:     Matthew Woehlke <matthew.woehlke at kitware.com>
AuthorDate: Thu Apr 20 14:44:25 2017 -0400
Commit:     Matthew Woehlke <matthew.woehlke at kitware.com>
CommitDate: Fri Apr 21 10:51:09 2017 -0400

    UseJava: Support namespaced exports
    
    Add NAMESPACE option to export_jars and install_jar_exports. Import
    JAR's as imported static libraries rather than custom targets, as this
    is necessary to allow the imported targets to contain ':' in their
    names. (This also means they won't show up in VS projects, which is more
    consistent with other imported targets.) Also, improve the documentation
    to be more stylistically consistent with documentation elsewhere.

diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 93255ae..8ae3720 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -244,21 +244,23 @@
 #
 # ::
 #
-#  install_jar_exports(TARGETS jar1 [jar2 ...]
-#                      FILE export_filename
-#                      DESTINATION destination [COMPONENT component])
+#  install_jar_exports(TARGETS jars...
+#                      [NAMESPACE <namespace>]
+#                      FILE <filename>
+#                      DESTINATION <dir> [COMPONENT <component>])
 #
-# This command installs a target export file export_filename for the named jar
-# targets to the given DESTINATION. Its function is similar to that of
-# install(EXPORTS).
+# This command installs a target export file ``<filename>`` for the named jar
+# targets to the given ``DESTINATION``. Its function is similar to that of
+# :command:`install(EXPORTS ...)`.
 #
 # ::
 #
-#  export_jars(TARGETS jar1 [jar2 ...]
-#              FILE export_filename)
+#  export_jars(TARGETS jars...
+#              [NAMESPACE <namespace>]
+#              FILE <filename>)
 #
-# This command writes a target export file export_filename for the named jar
-# targets. Its function is similar to that of export().
+# This command writes a target export file ``<filename>`` for the named jar
+# targets. Its function is similar to that of :command:`export(...)`.
 #
 # ::
 #
@@ -424,10 +426,12 @@ endfunction()
 function(__java_export_jar VAR TARGET PATH)
     get_target_property(_jarpath ${TARGET} JAR_FILE)
     get_filename_component(_jarname ${_jarpath} NAME)
+    set(_target "${_jar_NAMESPACE}${TARGET}")
     __java_lcat(${VAR}
-      "# Create imported target ${TARGET}"
-      "add_custom_target(${TARGET})"
-      "set_target_properties(${TARGET} PROPERTIES"
+      "# Create imported target ${_target}"
+      "add_library(${_target} IMPORTED STATIC)"
+      "set_target_properties(${_target} PROPERTIES"
+      "  IMPORTED_LOCATION \"${PATH}/${_jarname}\""
       "  JAR_FILE \"${PATH}/${_jarname}\")"
       ""
     )
@@ -1341,7 +1345,7 @@ function(export_jars)
     # Parse and validate arguments
     cmake_parse_arguments(_export_jars
       ""
-      "FILE"
+      "FILE;NAMESPACE"
       "TARGETS"
       ${ARGN}
     )
@@ -1351,6 +1355,7 @@ function(export_jars)
     if (NOT _export_jars_TARGETS)
       message(SEND_ERROR "export_jars: TARGETS must be specified.")
     endif()
+    set(_jar_NAMESPACE "${_export_jars_NAMESPACE}")
 
     # Set content of generated exports file
     string(REPLACE ";" " " __targets__ "${_export_jars_TARGETS}")
@@ -1373,7 +1378,7 @@ function(install_jar_exports)
     # Parse and validate arguments
     cmake_parse_arguments(_install_jar_exports
       ""
-      "FILE;DESTINATION;COMPONENT"
+      "FILE;DESTINATION;COMPONENT;NAMESPACE"
       "TARGETS"
       ${ARGN}
     )
@@ -1386,6 +1391,7 @@ function(install_jar_exports)
     if (NOT _install_jar_exports_TARGETS)
       message(SEND_ERROR "install_jar_exports: TARGETS must be specified.")
     endif()
+    set(_jar_NAMESPACE "${_install_jar_exports_NAMESPACE}")
 
     if (_install_jar_exports_COMPONENT)
       set (_COMPONENT COMPONENT ${_install_jar_exports_COMPONENT})

-----------------------------------------------------------------------

Summary of changes:
 Help/generator/Visual Studio 8 2005.rst            |    9 +-
 Help/generator/Xcode.rst                           |    2 +
 Help/release/dev/remove-xcode-2.rst                |    5 +
 Help/release/dev/vs8-deprecate.rst                 |    5 +
 Modules/CMakeDetermineCompilerId.cmake             |   14 +-
 Modules/CompilerId/Xcode-1.pbxproj.in              |  120 ------
 Modules/CompilerId/Xcode-2.pbxproj.in              |  119 ------
 Modules/FindMPI.cmake                              |  104 +++--
 Modules/UseJava.cmake                              |   36 +-
 Source/CTest/cmCTestTestCommand.cxx                |    3 +-
 Source/CTest/cmCTestTestHandler.cxx                |    8 +-
 Source/cmGlobalVisualStudio7Generator.cxx          |   13 +
 Source/cmGlobalVisualStudio8Generator.cxx          |    2 +-
 Source/cmGlobalXCodeGenerator.cxx                  |  452 +++++++-------------
 Source/cmGlobalXCodeGenerator.h                    |    3 +-
 Tests/CMakeLib/CMakeLists.txt                      |   10 -
 Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt       |   15 -
 Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt |    8 -
 Tests/JavaExportImport/BuildExport/CMakeLists.txt  |    5 +-
 Tests/JavaExportImport/Import/CMakeLists.txt       |    2 +-
 .../JavaExportImport/InstallExport/CMakeLists.txt  |    1 +
 Tests/RunCMake/CMakeLists.txt                      |   24 +-
 .../CommandLine/DeprecateVS8-WARN-OFF.cmake        |    0
 .../CommandLine/DeprecateVS8-WARN-ON-stderr.txt    |    5 +
 .../CommandLine/DeprecateVS8-WARN-ON.cmake         |    0
 Tests/RunCMake/CommandLine/RunCMakeTest.cmake      |    7 +
 Tests/RunCMake/File_Generate/RunCMakeTest.cmake    |    2 +-
 Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake |    4 +-
 Tests/RunCMake/RunCMake.cmake                      |    3 +
 Tests/RunCMake/TargetSources/RunCMakeTest.cmake    |    2 +-
 30 files changed, 298 insertions(+), 685 deletions(-)
 create mode 100644 Help/release/dev/remove-xcode-2.rst
 create mode 100644 Help/release/dev/vs8-deprecate.rst
 delete mode 100644 Modules/CompilerId/Xcode-1.pbxproj.in
 delete mode 100644 Modules/CompilerId/Xcode-2.pbxproj.in
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake (100%)
 create mode 100644 Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list