Browse Source

cmLocalGenerator: Clarify name of method to write unity source include lines

Brad King 4 years ago
parent
commit
de6e362a88
2 changed files with 11 additions and 10 deletions
  1. 7 5
      Source/cmLocalGenerator.cxx
  2. 4 5
      Source/cmLocalGenerator.h

+ 7 - 5
Source/cmLocalGenerator.cxx

@@ -2819,15 +2819,17 @@ std::string cmLocalGenerator::WriteUnitySource(
   file << "/* generated by CMake */\n\n";
   for (cmSourceFile* sf : sources) {
     RegisterUnitySources(target, sf, filename);
-    IncludeFileInUnitySources(file, sf->ResolveFullPath(), beforeInclude,
-                              afterInclude, uniqueIdName);
+    WriteUnitySourceInclude(file, sf->ResolveFullPath(), beforeInclude,
+                            afterInclude, uniqueIdName);
   }
   return filename;
 }
 
-void cmLocalGenerator::IncludeFileInUnitySources(
-  cmGeneratedFileStream& unity_file, std::string const& sf_full_path,
-  cmValue beforeInclude, cmValue afterInclude, cmValue uniqueIdName) const
+void cmLocalGenerator::WriteUnitySourceInclude(std::ostream& unity_file,
+                                               std::string const& sf_full_path,
+                                               cmValue beforeInclude,
+                                               cmValue afterInclude,
+                                               cmValue uniqueIdName) const
 {
   if (cmNonempty(uniqueIdName)) {
     std::string pathToHash;

+ 4 - 5
Source/cmLocalGenerator.h

@@ -28,7 +28,6 @@ class cmComputeLinkInformation;
 class cmCustomCommand;
 class cmCustomCommandGenerator;
 class cmCustomCommandLines;
-class cmGeneratedFileStream;
 class cmGeneratorTarget;
 class cmGlobalGenerator;
 class cmImplicitDependsList;
@@ -665,10 +664,10 @@ private:
     cmGeneratorTarget* target,
     cmRange<std::vector<cmSourceFile*>::const_iterator> sources,
     cmValue beforeInclude, cmValue afterInclude, std::string filename) const;
-  void IncludeFileInUnitySources(cmGeneratedFileStream& unity_file,
-                                 std::string const& sf_full_path,
-                                 cmValue beforeInclude, cmValue afterInclude,
-                                 cmValue uniqueIdName) const;
+  void WriteUnitySourceInclude(std::ostream& unity_file,
+                               std::string const& sf_full_path,
+                               cmValue beforeInclude, cmValue afterInclude,
+                               cmValue uniqueIdName) const;
   std::vector<std::string> AddUnityFilesModeAuto(
     cmGeneratorTarget* target, std::string const& lang,
     std::vector<cmSourceFile*> const& filtered_sources, cmValue beforeInclude,