[Cmake-commits] CMake branch, next, updated. v2.8.12-4925-g2f9c1e5

Peter Kuemmel syntheticpp at gmx.net
Tue Nov 5 13:13:42 EST 2013


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, next has been updated
       via  2f9c1e53c754425d60ca8c459497f6cf24fdb1b4 (commit)
       via  0b0ff57a082045ab309eeee15bf87344575276f4 (commit)
      from  9d6de1b2b6bf405124e1baabaa495077ef2fbd0d (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f9c1e53c754425d60ca8c459497f6cf24fdb1b4
commit 2f9c1e53c754425d60ca8c459497f6cf24fdb1b4
Merge: 9d6de1b 0b0ff57
Author:     Peter Kuemmel <syntheticpp at gmx.net>
AuthorDate: Tue Nov 5 13:13:39 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 5 13:13:39 2013 -0500

    Merge topic 'ninja-experimental-pool-support' into next
    
    0b0ff57 Ninja: add pool support

diff --cc Help/manual/cmake-properties.7.rst
index e3a4cf8,cab5b4a..c5c1a81
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@@ -96,11 -97,9 +97,12 @@@ Properties on Target
     /prop_tgt/COMPILE_DEFINITIONS
     /prop_tgt/COMPILE_FLAGS
     /prop_tgt/COMPILE_OPTIONS
 +   /prop_tgt/COMPILE_FEATURES
     /prop_tgt/CONFIG_OUTPUT_NAME
+    /prop_tgt/COMPILE_POOL
     /prop_tgt/CONFIG_POSTFIX
 +   /prop_tgt/CXX_STANDARD
 +   /prop_tgt/CXX_EXTENSIONS
     /prop_tgt/DEBUG_POSTFIX
     /prop_tgt/DEFINE_SYMBOL
     /prop_tgt/EchoString

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b0ff57a082045ab309eeee15bf87344575276f4
commit 0b0ff57a082045ab309eeee15bf87344575276f4
Author:     Peter Kümmel <syntheticpp at gmx.net>
AuthorDate: Tue Nov 5 18:33:45 2013 +0100
Commit:     Peter Kümmel <syntheticpp at gmx.net>
CommitDate: Tue Nov 5 19:08:01 2013 +0100

    Ninja: add pool support
    
    With ninja it is possible to control the number of concurrent jobs.
    
    Example:
    
    set_property(GLOBAL PROPERTY POOLS "link=1;compile=1;custom=1")
    
    set(b ${CMAKE_BINARY_DIR})
    FILE(WRITE ${b}/foo.cpp "")
    FILE(WRITE ${b}/foo2.cpp "")
    
    set_source_files_properties(${b}/foo.cpp PROPERTIES COMPILE_POOL compile)
    add_library(lib ${b}/foo.cpp)
    set_property(TARGET lib PROPERTY LINK_POOL link)
    
    add_library(lib2 ${b}/foo.cpp ${b}/foo2.cpp)
    set_property(TARGET lib2 PROPERTY COMPILE_POOL compile)
    
    add_custom_command(
      OUTPUT ${b}/foo3.cpp
      COMMAND ${CMAKE_COMMAND} -E copy ${b}/foo.cpp ${b}/foo3.cpp
      POOL custom)
    
    add_custom_command(
      OUTPUT ${b}/foo4.cpp
      COMMAND ${CMAKE_COMMAND} -E copy ${b}/foo.cpp ${b}/foo4.cpp
      POOL custom)
    
    add_library(lib3 ${b}/foo3.cpp ${b}/foo4.cpp)

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index d6d42ad..cab5b4a 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -27,6 +27,7 @@ Properties of Global Scope
    /prop_gbl/IN_TRY_COMPILE
    /prop_gbl/PACKAGES_FOUND
    /prop_gbl/PACKAGES_NOT_FOUND
+   /prop_gbl/POOLS
    /prop_gbl/PREDEFINED_TARGETS_FOLDER
    /prop_gbl/REPORT_UNDEFINED_PROPERTIES
    /prop_gbl/RULE_LAUNCH_COMPILE
@@ -97,6 +98,7 @@ Properties on Targets
    /prop_tgt/COMPILE_FLAGS
    /prop_tgt/COMPILE_OPTIONS
    /prop_tgt/CONFIG_OUTPUT_NAME
+   /prop_tgt/COMPILE_POOL
    /prop_tgt/CONFIG_POSTFIX
    /prop_tgt/DEBUG_POSTFIX
    /prop_tgt/DEFINE_SYMBOL
@@ -162,6 +164,7 @@ Properties on Targets
    /prop_tgt/LINK_INTERFACE_MULTIPLICITY_CONFIG
    /prop_tgt/LINK_INTERFACE_MULTIPLICITY
    /prop_tgt/LINK_LIBRARIES
+   /prop_tgt/LINK_POOL
    /prop_tgt/LINK_SEARCH_END_STATIC
    /prop_tgt/LINK_SEARCH_START_STATIC
    /prop_tgt/LOCATION_CONFIG
diff --git a/Help/prop_gbl/POOLS.rst b/Help/prop_gbl/POOLS.rst
new file mode 100644
index 0000000..299f6ed
--- /dev/null
+++ b/Help/prop_gbl/POOLS.rst
@@ -0,0 +1,9 @@
+POOL
+--------------
+
+Ninja generators only: List of pools to use
+
+A pool is a named integer property and defines the maximum number
+of concurrent jobs which can be started by a rule assigned to the pool.
+The POOL property is a semicolon-separated list of pairs using
+the syntax NAME=integer.
diff --git a/Help/prop_tgt/COMPILE_POOL.rst b/Help/prop_tgt/COMPILE_POOL.rst
new file mode 100644
index 0000000..15b971a
--- /dev/null
+++ b/Help/prop_tgt/COMPILE_POOL.rst
@@ -0,0 +1,7 @@
+COMPILE_POOL
+-------------------
+
+Ninja only: Pool which should be used when compiling sources
+
+The number of parallel compile process could be limited by setting
+the global POOLS property and specifing here the pool name.
diff --git a/Help/prop_tgt/LINK_POOL.rst b/Help/prop_tgt/LINK_POOL.rst
new file mode 100644
index 0000000..0ddb9f7
--- /dev/null
+++ b/Help/prop_tgt/LINK_POOL.rst
@@ -0,0 +1,7 @@
+LINK_POOL
+-------------------
+
+Ninja only: Pool which should be used when linking the target
+
+The number of parallel link process could be limited by setting
+the global POOLS property and specifing here the pool name.
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 5634849..1275562 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -31,6 +31,7 @@ bool cmAddCustomCommandCommand
 
   std::string source, target, main_dependency, working;
   std::string comment_buffer;
+  std::string pool;
   const char* comment = 0;
   std::vector<std::string> depends, outputs, output;
   bool verbatim = false;
@@ -58,6 +59,7 @@ bool cmAddCustomCommandCommand
     doing_outputs,
     doing_comment,
     doing_working_directory,
+    doing_pool,
     doing_nothing
   };
 
@@ -138,6 +140,10 @@ bool cmAddCustomCommandCommand
       {
       doing = doing_comment;
       }
+    else if (copy == "POOL")
+      {
+      doing = doing_pool;
+      }
     else
       {
       std::string filename;
@@ -228,6 +234,9 @@ bool cmAddCustomCommandCommand
            comment_buffer = copy;
            comment = comment_buffer.c_str();
            break;
+         case doing_pool:
+           pool = copy;
+           break;
          default:
            this->SetError("Wrong syntax. Unknown type of argument.");
            return false;
@@ -317,7 +326,8 @@ bool cmAddCustomCommandCommand
                                              main_dependency.c_str(),
                                              commandLines, comment,
                                              working.c_str(), false,
-                                             escapeOldStyle);
+                                             escapeOldStyle,
+                                             pool.c_str());
 
     // Add implicit dependency scanning requests if any were given.
     if(!implicit_depends.empty())
diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h
index 114957f..b0645ca 100644
--- a/Source/cmAddCustomCommandCommand.h
+++ b/Source/cmAddCustomCommandCommand.h
@@ -44,6 +44,7 @@ public:
   virtual const char* GetName() const {return "add_custom_command";}
 
   cmTypeMacro(cmAddCustomCommandCommand, cmCommand);
+
 protected:
   bool CheckOutputs(const std::vector<std::string>& outputs);
 };
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx
index 3620a38..86003c8 100644
--- a/Source/cmCustomCommand.cxx
+++ b/Source/cmCustomCommand.cxx
@@ -31,6 +31,7 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
   HaveComment(r.HaveComment),
   Comment(r.Comment),
   WorkingDirectory(r.WorkingDirectory),
+  Pool(r.Pool),
   EscapeAllowMakeVars(r.EscapeAllowMakeVars),
   EscapeOldStyle(r.EscapeOldStyle),
   Backtrace(new cmListFileBacktrace(*r.Backtrace))
@@ -69,13 +70,15 @@ cmCustomCommand::cmCustomCommand(cmMakefile* mf,
                                  const std::vector<std::string>& depends,
                                  const cmCustomCommandLines& commandLines,
                                  const char* comment,
-                                 const char* workingDirectory):
+                                 const char* workingDirectory,
+                                 const char* pool):
   Outputs(outputs),
   Depends(depends),
   CommandLines(commandLines),
   HaveComment(comment?true:false),
   Comment(comment?comment:""),
   WorkingDirectory(workingDirectory?workingDirectory:""),
+  Pool(pool?pool:""),
   EscapeAllowMakeVars(false),
   EscapeOldStyle(true),
   Backtrace(new cmListFileBacktrace)
@@ -130,6 +133,12 @@ const char* cmCustomCommand::GetComment() const
 }
 
 //----------------------------------------------------------------------------
+std::string cmCustomCommand::GetPool() const
+{
+  return this->Pool;
+}
+
+//----------------------------------------------------------------------------
 void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines)
 {
   for(cmCustomCommandLines::const_iterator i=commandLines.begin();
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index e20d2bf..cbc4c57 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -35,7 +35,8 @@ public:
                   const std::vector<std::string>& depends,
                   const cmCustomCommandLines& commandLines,
                   const char* comment,
-                  const char* workingDirectory);
+                  const char* workingDirectory,
+                  const char* pool);
 
   ~cmCustomCommand();
 
@@ -54,6 +55,9 @@ public:
   /** Get the comment string for the command.  */
   const char* GetComment() const;
 
+  /** Get the pool name for the command.  */
+  std::string GetPool() const;
+
   /** Append to the list of command lines.  */
   void AppendCommands(const cmCustomCommandLines& commandLines);
 
@@ -85,6 +89,7 @@ private:
   bool HaveComment;
   std::string Comment;
   std::string WorkingDirectory;
+  std::string Pool;
   bool EscapeAllowMakeVars;
   bool EscapeOldStyle;
   cmListFileBacktrace* Backtrace;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index dd7311e..551cb6d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2384,7 +2384,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
   std::vector<std::string> no_depends;
   // Store the custom command in the target.
   cmCustomCommand cc(0, no_outputs, no_depends, *commandLines, 0,
-                     workingDirectory);
+                     workingDirectory, 0);
   target.GetPostBuildCommands().push_back(cc);
   target.SetProperty("EchoString", message);
   std::vector<std::string>::iterator dit;
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d262397..a4d0e02 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -256,7 +256,8 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
                                                 const std::string& comment,
                                                 const cmNinjaDeps& outputs,
                                                 const cmNinjaDeps& deps,
-                                                const cmNinjaDeps& orderOnly)
+                                                const cmNinjaDeps& orderOnly,
+                                                const std::string& pool)
 {
   std::string cmd = command;
 #ifdef _WIN32
@@ -270,6 +271,8 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
   cmNinjaVars vars;
   vars["COMMAND"] = cmd;
   vars["DESC"] = EncodeLiteral(description);
+  if (!pool.empty())
+    vars["pool"] = pool;
 
   this->WriteBuild(*this->BuildFileStream,
                    comment,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index be58df1..1a2a3d5 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -105,7 +105,9 @@ public:
                                const std::string& comment,
                                const cmNinjaDeps& outputs,
                                const cmNinjaDeps& deps = cmNinjaDeps(),
-                               const cmNinjaDeps& orderOnly = cmNinjaDeps());
+                               const cmNinjaDeps& orderOnly = cmNinjaDeps(),
+                               const std::string& pool = std::string());
+
   void WriteMacOSXContentBuild(const std::string& input,
                                const std::string& output);
 
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index f1d5e2c..a8abb33 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -183,6 +183,7 @@ void cmLocalNinjaGenerator::WriteBuildFileTop()
 
   // For the rule file.
   this->WriteProjectHeader(this->GetRulesFileStream());
+  this->WritePools(this->GetRulesFileStream());
 }
 
 void cmLocalNinjaGenerator::WriteProjectHeader(std::ostream& os)
@@ -195,6 +196,32 @@ void cmLocalNinjaGenerator::WriteProjectHeader(std::ostream& os)
   cmGlobalNinjaGenerator::WriteDivider(os);
 }
 
+void cmLocalNinjaGenerator::WritePools(std::ostream& os)
+{
+  cmGlobalNinjaGenerator::WriteDivider(os);
+
+  const char* poolsStr = this->GetCMakeInstance()->
+      GetProperty("POOLS", cmProperty::GLOBAL);
+  if (poolsStr)
+  {
+      std::vector<std::string> pools;
+      cmSystemTools::ExpandListArgument(poolsStr, pools);
+      for (size_t i = 0; i < pools.size(); ++i)
+      {
+          const std::string pool = pools[i];
+          std::string::size_type eq = pool.find("=");
+          if (eq != std::string::npos && pool.size() > eq)
+          {
+              os << "pool " << pool.substr(0, eq) << std::endl;
+              os << "  depth = " << pool.substr(eq + 1) << std::endl;
+              os << std::endl;
+          }
+      }
+  }
+
+  cmGlobalNinjaGenerator::WriteDivider(os);
+}
+
 void cmLocalNinjaGenerator::WriteNinjaFilesInclusion(std::ostream& os)
 {
   cmGlobalNinjaGenerator::WriteDivider(os);
@@ -368,7 +395,8 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
       "Custom command for " + ninjaOutputs[0],
       ninjaOutputs,
       ninjaDeps,
-      orderOnlyDeps);
+      orderOnlyDeps,
+      cc->GetPool());
   }
 }
 
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index 8eb63c5..ea854c6 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -112,6 +112,7 @@ private:
   void WriteProjectHeader(std::ostream& os);
   void WriteNinjaFilesInclusion(std::ostream& os);
   void WriteProcessedMakefile(std::ostream& os);
+  void WritePools(std::ostream& os);
 
   void SetConfigName();
 
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index a665b93..b352450 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -805,7 +805,7 @@ cmLocalVisualStudio6Generator::MaybeCreateOutputDir(cmTarget& target,
   std::vector<std::string> no_depends;
   cmCustomCommandLines commands;
   commands.push_back(command);
-  pcc.reset(new cmCustomCommand(0, no_output, no_depends, commands, 0, 0));
+  pcc.reset(new cmCustomCommand(0, no_output, no_depends, commands, 0, 0, 0));
   pcc->SetEscapeOldStyle(false);
   pcc->SetEscapeAllowMakeVars(true);
   return pcc;
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index ef2bb1d..08daaac 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -58,7 +58,7 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
   std::vector<std::string> no_depends;
   cmCustomCommandLines commands;
   commands.push_back(command);
-  pcc.reset(new cmCustomCommand(0, no_output, no_depends, commands, 0, 0));
+  pcc.reset(new cmCustomCommand(0, no_output, no_depends, commands, 0, 0, 0));
   pcc->SetEscapeOldStyle(false);
   pcc->SetEscapeAllowMakeVars(true);
   return pcc;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c18a7eb..30c8d09 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -897,7 +897,7 @@ cmMakefile::AddCustomCommandToTarget(const char* target,
     // Add the command to the appropriate build step for the target.
     std::vector<std::string> no_output;
     cmCustomCommand cc(this, no_output, depends,
-                       commandLines, comment, workingDir);
+                       commandLines, comment, workingDir, 0);
     cc.SetEscapeOldStyle(escapeOldStyle);
     cc.SetEscapeAllowMakeVars(true);
     switch(type)
@@ -924,7 +924,8 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
                                      const char* comment,
                                      const char* workingDir,
                                      bool replace,
-                                     bool escapeOldStyle)
+                                     bool escapeOldStyle,
+                                     const char* pool)
 {
   // Make sure there is at least one output.
   if(outputs.empty())
@@ -1027,7 +1028,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
     {
     cmCustomCommand* cc =
       new cmCustomCommand(this, outputs, depends2, commandLines,
-                          comment, workingDir);
+                          comment, workingDir, pool);
     cc->SetEscapeOldStyle(escapeOldStyle);
     cc->SetEscapeAllowMakeVars(true);
     file->SetCustomCommand(cc);
@@ -1078,13 +1079,14 @@ cmMakefile::AddCustomCommandToOutput(const char* output,
                                      const char* comment,
                                      const char* workingDir,
                                      bool replace,
-                                     bool escapeOldStyle)
+                                     bool escapeOldStyle,
+                                     const char* pool)
 {
   std::vector<std::string> outputs;
   outputs.push_back(output);
   return this->AddCustomCommandToOutput(outputs, depends, main_dependency,
                                         commandLines, comment, workingDir,
-                                        replace, escapeOldStyle);
+                                        replace, escapeOldStyle, pool);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 76958ca..94a5956 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -174,6 +174,7 @@ public:
                                 cmTarget::CustomCommandType type,
                                 const char* comment, const char* workingDir,
                                 bool escapeOldStyle = true);
+
   cmSourceFile* AddCustomCommandToOutput(
     const std::vector<std::string>& outputs,
     const std::vector<std::string>& depends,
@@ -181,15 +182,18 @@ public:
     const cmCustomCommandLines& commandLines,
     const char* comment, const char* workingDir,
     bool replace = false,
-    bool escapeOldStyle = true);
-  cmSourceFile* AddCustomCommandToOutput(
-    const char* output,
+    bool escapeOldStyle = true,
+    const char *pool = 0);
+
+  cmSourceFile* AddCustomCommandToOutput(const char* output,
     const std::vector<std::string>& depends,
     const char* main_dependency,
     const cmCustomCommandLines& commandLines,
     const char* comment, const char* workingDir,
     bool replace = false,
-    bool escapeOldStyle = true);
+    bool escapeOldStyle = true,
+    const char* pool = 0);
+
   void AddCustomCommandOldStyle(const char* target,
                                 const std::vector<std::string>& outputs,
                                 const std::vector<std::string>& depends,
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 015654b..6e3bc47 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -455,12 +455,17 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
 
   std::string frameworkPath;
   std::string linkPath;
+  cmGeneratorTarget* target = this->GetGeneratorTarget();
   this->GetLocalGenerator()->GetTargetFlags(vars["LINK_LIBRARIES"],
                                             vars["FLAGS"],
                                             vars["LINK_FLAGS"],
                                             frameworkPath,
                                             linkPath,
-                                            this->GetGeneratorTarget());
+                                            target);
+
+  const char* pool = target->GetProperty("LINK_POOL");
+  if (pool)
+    vars["pool"] = pool;
 
   this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);
   vars["LINK_FLAGS"] = cmGlobalNinjaGenerator
@@ -475,7 +480,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
                                ? vars["FLAGS"]
                                : vars["ARCH_FLAGS"]);
   this->GetLocalGenerator()->AddArchitectureFlags(flags,
-                             this->GetGeneratorTarget(),
+                             target,
                              this->TargetLinkLanguage,
                              this->GetConfigName());
   if (targetType == cmTarget::EXECUTABLE) {
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 26eadbe..8714be8 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -568,10 +568,22 @@ cmNinjaTargetGenerator
   EnsureParentDirectoryExists(objectFileName);
 
   std::string objectDir = cmSystemTools::GetFilenamePath(objectFileName);
+
   vars["OBJECT_DIR"] = this->GetLocalGenerator()->ConvertToOutputFormat(
                          ConvertToNinjaPath(objectDir.c_str()).c_str(),
                          cmLocalGenerator::SHELL);
 
+  const char* srcpool = source->GetProperty("COMPILE_POOL");
+  if (srcpool) {
+    vars["pool"] = srcpool;
+  } else {
+    const char* targetpool = this->GetTarget()->GetProperty("COMPILE_POOL");
+    if (targetpool) {
+      vars["pool"] = targetpool;
+    }
+  }
+
+
   this->SetMsvcTargetPdbVariable(vars);
 
   if(this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS"))
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 5f7a26f..a8603e6 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -308,7 +308,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
     std::vector<std::string> no_output;
     cmCustomCommand cc(makefile, no_output, depends,
                        commandLines, autogenComment.c_str(),
-                       workingDirectory.c_str());
+                       workingDirectory.c_str(), 0);
     cc.SetEscapeOldStyle(false);
     cc.SetEscapeAllowMakeVars(true);
     target->GetPreBuildCommands().push_back(cc);

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

Summary of changes:
 Help/manual/cmake-properties.7.rst       |    3 +++
 Help/prop_gbl/POOLS.rst                  |    9 +++++++++
 Help/prop_tgt/COMPILE_POOL.rst           |    7 +++++++
 Help/prop_tgt/LINK_POOL.rst              |    7 +++++++
 Source/cmAddCustomCommandCommand.cxx     |   12 +++++++++++-
 Source/cmAddCustomCommandCommand.h       |    1 +
 Source/cmCustomCommand.cxx               |   11 ++++++++++-
 Source/cmCustomCommand.h                 |    7 ++++++-
 Source/cmGlobalGenerator.cxx             |    2 +-
 Source/cmGlobalNinjaGenerator.cxx        |    5 ++++-
 Source/cmGlobalNinjaGenerator.h          |    4 +++-
 Source/cmLocalNinjaGenerator.cxx         |   30 +++++++++++++++++++++++++++++-
 Source/cmLocalNinjaGenerator.h           |    1 +
 Source/cmLocalVisualStudio6Generator.cxx |    2 +-
 Source/cmLocalVisualStudioGenerator.cxx  |    2 +-
 Source/cmMakefile.cxx                    |   12 +++++++-----
 Source/cmMakefile.h                      |   12 ++++++++----
 Source/cmNinjaNormalTargetGenerator.cxx  |    9 +++++++--
 Source/cmNinjaTargetGenerator.cxx        |   12 ++++++++++++
 Source/cmQtAutoGenerators.cxx            |    2 +-
 20 files changed, 129 insertions(+), 21 deletions(-)
 create mode 100644 Help/prop_gbl/POOLS.rst
 create mode 100644 Help/prop_tgt/COMPILE_POOL.rst
 create mode 100644 Help/prop_tgt/LINK_POOL.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list