diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 0e02b0a9f8588407e73d42b15ea5230c244732bd..e3835ff1876dff079573180cc03b5e0c21dba79f 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -130,6 +130,7 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
   this->DefaultNasmFlagTable = cmVS10NASMFlagTable;
   this->DefaultRcFlagTable = cmVS10RCFlagTable;
   this->Version = VS10;
+  this->PlatformToolsetNeedsDebugEnum = false;
 }
 
 bool cmGlobalVisualStudio10Generator::MatchesGeneratorName(
@@ -195,6 +196,24 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
     return false;
   }
 
+  if (cmHasLiteralPrefix(this->GetPlatformToolsetString(), "v140")) {
+    // The GenerateDebugInformation link setting for the v140 toolset
+    // in VS 2015 was originally an enum with "No" and "Debug" values,
+    // differing from the "false" and "true" values used in older toolsets.
+    // A VS 2015 update changed it back.  Parse the "link.xml" file to
+    // discover which one we need.
+    std::string const link_xml = this->VCTargetsPath + "/1033/link.xml";
+    cmsys::ifstream fin(link_xml.c_str());
+    std::string line;
+    while (fin && cmSystemTools::GetLineFromStream(fin, line)) {
+      if (line.find(" Switch=\"DEBUG\" ") != std::string::npos) {
+        this->PlatformToolsetNeedsDebugEnum =
+          line.find(" Name=\"Debug\" ") != std::string::npos;
+        break;
+      }
+    }
+  }
+
   if (this->GeneratorToolsetCuda.empty()) {
     // Find the highest available version of the CUDA tools.
     std::vector<std::string> cudaTools;
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 20f992af39465e061ad541d7b9c0913276f8ecfd..4a5c2454b22a2f3e9dafec37333ae8ae2a042cd7 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -59,6 +59,13 @@ public:
   const char* GetPlatformToolsetCuda() const;
   std::string const& GetPlatformToolsetCudaString() const;
 
+  /** Return whether we need to use No/Debug instead of false/true
+      for GenerateDebugInformation.  */
+  bool GetPlatformToolsetNeedsDebugEnum() const
+  {
+    return this->PlatformToolsetNeedsDebugEnum;
+  }
+
   /** Return the CMAKE_SYSTEM_NAME.  */
   std::string const& GetSystemName() const { return this->SystemName; }
 
@@ -169,6 +176,8 @@ private:
   virtual std::string FindDevEnvCommand();
   virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); }
 
+  bool PlatformToolsetNeedsDebugEnum;
+
   bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf);
 
   std::string VCTargetsPath;
diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h
index 618087a1078a2ae40825ad98029c992d7d604789..613541c62cbb2a40d4aa8f74910c186e5d0af1b7 100644
--- a/Source/cmVS140LinkFlagTable.h
+++ b/Source/cmVS140LinkFlagTable.h
@@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = {
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
     "Optimize for faster linking", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
-  { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug",
+  { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true",
     cmVS7FlagTable::CaseInsensitive },
 
   { "SubSystem", "", "Not Set", "NotSet", 0 },
diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h
index e707b90b0de63098c591942cd6ed25b7a97744aa..ff0c1da65dfe9a9d4725013e2970fed3985cc6cf 100644
--- a/Source/cmVS141LinkFlagTable.h
+++ b/Source/cmVS141LinkFlagTable.h
@@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = {
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
     "Generate Debug Information optimized for faster links", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
-  { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug",
+  { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true",
     cmVS7FlagTable::CaseInsensitive },
 
   { "SubSystem", "", "Not Set", "NotSet", 0 },
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index de1f5b0454ed38bbc12b14857949fc108b29cd47..88fa19c6083fc79cbcbbb801c25847106fd82681 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -17,8 +17,6 @@
 
 #include "cm_auto_ptr.hxx"
 
-static std::string const kWINDOWS_7_1_SDK = "Windows7.1SDK";
-
 static std::string cmVS10EscapeXML(std::string arg)
 {
   cmSystemTools::ReplaceString(arg, "&", "&amp;");
@@ -3130,12 +3128,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
       linkOptions.AddFlag("StackReserveSize", stackVal);
     }
 
-    if (this->LocalGenerator->GetVersion() >=
-        cmGlobalVisualStudioGenerator::VS14) {
-      linkOptions.AddFlag("GenerateDebugInformation", "No");
-    } else {
-      linkOptions.AddFlag("GenerateDebugInformation", "false");
-    }
+    linkOptions.AddFlag("GenerateDebugInformation", "false");
 
     std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
     pdb += "/";
@@ -3182,26 +3175,14 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
                            "%(IgnoreSpecificDefaultLibraries)");
   }
 
-  // Hack to fix flag version selection in a common use case.
-  // FIXME: Select flag table based on toolset instead of VS version.
-  if (this->LocalGenerator->GetVersion() >=
-      cmGlobalVisualStudioGenerator::VS14) {
-    const char* toolset = gg->GetPlatformToolset();
-    if (toolset &&
-        (toolset == kWINDOWS_7_1_SDK || /* clang-format please break here */
-         cmHasLiteralPrefix(toolset, "v80") ||
-         cmHasLiteralPrefix(toolset, "v90") ||
-         cmHasLiteralPrefix(toolset, "v100") ||
-         cmHasLiteralPrefix(toolset, "v110") ||
-         cmHasLiteralPrefix(toolset, "v120"))) {
-      if (const char* debug =
-            linkOptions.GetFlag("GenerateDebugInformation")) {
-        // Convert value from enumeration back to boolean for older toolsets.
-        if (strcmp(debug, "No") == 0) {
-          linkOptions.AddFlag("GenerateDebugInformation", "false");
-        } else if (strcmp(debug, "Debug") == 0) {
-          linkOptions.AddFlag("GenerateDebugInformation", "true");
-        }
+  // VS 2015 without all updates has a v140 toolset whose
+  // GenerateDebugInformation expects No/Debug instead of false/true.
+  if (gg->GetPlatformToolsetNeedsDebugEnum()) {
+    if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation")) {
+      if (strcmp(debug, "false") == 0) {
+        linkOptions.AddFlag("GenerateDebugInformation", "No");
+      } else if (strcmp(debug, "true") == 0) {
+        linkOptions.AddFlag("GenerateDebugInformation", "Debug");
       }
     }
   }