Переглянути джерело

VS: Fix warnings in generated references to '.settings' files

According to MSDN docs [1], LastGenOutput is just a file name.

[1] https://msdn.microsoft.com/en-us/library/bb629388.aspx
Yoshinori Tahara 8 роки тому
батько
коміт
15892aa3c0
1 змінених файлів з 2 додано та 6 видалено
  1. 2 6
      Source/cmVisualStudio10TargetGenerator.cxx

+ 2 - 6
Source/cmVisualStudio10TargetGenerator.cxx

@@ -1689,12 +1689,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
   } else if (ext == "natvis") {
     tool = "Natvis";
   } else if (ext == "settings") {
-    // remove path to current source dir (if files are in current source dir)
-    if (!sourceLink.empty()) {
-      settingsLastGenOutput = sourceLink;
-    } else {
-      settingsLastGenOutput = sf->GetFullPath();
-    }
+    settingsLastGenOutput =
+      cmsys::SystemTools::GetFilenameName(sf->GetFullPath());
     std::size_t pos = settingsLastGenOutput.find(".settings");
     settingsLastGenOutput.replace(pos, 9, ".Designer.cs");
     settingsGenerator = "SettingsSingleFileGenerator";