[Cmake-commits] CMake branch, next, updated. v2.8.7-2891-gff23f08

Peter Collingbourne peter at pcc.me.uk
Sun Feb 26 23:31:34 EST 2012


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  ff23f08e42eac641580563dc40b3e33b77b310ab (commit)
       via  a8fd24c0de93a37ee11f835fa721e21d3135831f (commit)
       via  c017dcfa79273fad4c7e354b50e5c046b032be41 (commit)
      from  f26005559a37e4218464ce00f9b3df2e690ea3eb (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=ff23f08e42eac641580563dc40b3e33b77b310ab
commit ff23f08e42eac641580563dc40b3e33b77b310ab
Merge: f260055 a8fd24c
Author:     Peter Collingbourne <peter at pcc.me.uk>
AuthorDate: Sun Feb 26 23:31:29 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Feb 26 23:31:29 2012 -0500

    Merge topic 'ninja-generator' into next
    
    a8fd24c Use cmSystemTools::ExpandListArgument to split compile/link commands
    c017dcf Add a missed license header


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8fd24c0de93a37ee11f835fa721e21d3135831f
commit a8fd24c0de93a37ee11f835fa721e21d3135831f
Author:     Peter Collingbourne <peter at pcc.me.uk>
AuthorDate: Mon Feb 27 04:05:31 2012 +0000
Commit:     Peter Collingbourne <peter at pcc.me.uk>
CommitDate: Mon Feb 27 04:05:38 2012 +0000

    Use cmSystemTools::ExpandListArgument to split compile/link commands

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 6e08bca..613c7b5 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -219,6 +219,7 @@ std::vector<std::string>
 cmNinjaNormalTargetGenerator
 ::ComputeLinkCmd()
 {
+  std::vector<std::string> linkCmds;
   cmTarget::TargetType targetType = this->GetTarget()->GetType();
   switch (targetType) {
     case cmTarget::STATIC_LIBRARY: {
@@ -230,7 +231,8 @@ cmNinjaNormalTargetGenerator
       if (const char *linkCmd =
             this->GetMakefile()->GetDefinition(linkCmdVar.c_str()))
         {
-        return std::vector<std::string>(1, linkCmd);
+        cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
+        return linkCmds;
         }
       }
 
@@ -249,7 +251,7 @@ cmNinjaNormalTargetGenerator
       linkCmdVar += "_ARCHIVE_CREATE";
       const char *linkCmd =
         this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
-      linkCmds.push_back(linkCmd);
+      cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
       }
       {
       std::string linkCmdVar = "CMAKE_";
@@ -257,7 +259,7 @@ cmNinjaNormalTargetGenerator
       linkCmdVar += "_ARCHIVE_FINISH";
       const char *linkCmd =
         this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
-      linkCmds.push_back(linkCmd);
+      cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
       }
       return linkCmds;
     }
@@ -281,7 +283,8 @@ cmNinjaNormalTargetGenerator
       }
       const char *linkCmd =
         this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
-      return std::vector<std::string>(1, linkCmd);
+      cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
+      return linkCmds;
     }
     default:
       assert(0 && "Unexpected target type");
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index c776fcf..d0b4156 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -334,8 +334,15 @@ cmNinjaTargetGenerator
   compileCmdVar += "_COMPILE_OBJECT";
   std::string compileCmd =
     this->GetMakefile()->GetRequiredDefinition(compileCmdVar.c_str());
+  std::vector<std::string> compileCmds;
+  cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
 
-  this->GetLocalGenerator()->ExpandRuleVariables(compileCmd, vars);
+  for (std::vector<std::string>::iterator i = compileCmds.begin();
+       i != compileCmds.end(); ++i)
+    this->GetLocalGenerator()->ExpandRuleVariables(*i, vars);
+
+  std::string cmdLine =
+    this->GetLocalGenerator()->BuildCommandLine(compileCmds);
 
   // Write the rule for compiling file of the given language.
   std::ostringstream comment;
@@ -343,7 +350,7 @@ cmNinjaTargetGenerator
   std::ostringstream description;
   description << "Building " << language << " object $out";
   this->GetGlobalGenerator()->AddRule(this->LanguageCompilerRule(language),
-                                      compileCmd,
+                                      cmdLine,
                                       description.str(),
                                       comment.str(),
                                       depfile);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c017dcfa79273fad4c7e354b50e5c046b032be41
commit c017dcfa79273fad4c7e354b50e5c046b032be41
Author:     Peter Collingbourne <peter at pcc.me.uk>
AuthorDate: Thu Feb 23 22:25:03 2012 +0000
Commit:     Peter Collingbourne <peter at pcc.me.uk>
CommitDate: Mon Feb 27 02:41:00 2012 +0000

    Add a missed license header

diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index bf8194d..8eeca77 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -1,3 +1,15 @@
+/*============================================================================
+  CMake - Cross Platform Makefile Generator
+  Copyright 2011 Peter Collingbourne <peter at pcc.me.uk>
+  Copyright 2011 Nicolas Despres <nicolas.despres at gmail.com>
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
 #include "cmNinjaUtilityTargetGenerator.h"
 #include "cmCustomCommand.h"
 #include "cmGeneratedFileStream.h"

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

Summary of changes:
 Source/cmNinjaNormalTargetGenerator.cxx  |   11 +++++++----
 Source/cmNinjaTargetGenerator.cxx        |   11 +++++++++--
 Source/cmNinjaUtilityTargetGenerator.cxx |   12 ++++++++++++
 3 files changed, 28 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list