[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1144-g236f564

Brad King brad.king at kitware.com
Sat Dec 6 07:43:20 EST 2014


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  236f564453e360fdc379d067d5a9734aef84c39b (commit)
       via  6c67b8168cd44e5900982ca3e36049792934d83d (commit)
      from  ad137b5af4f40f7c07df7da67684082c5e4a5012 (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=236f564453e360fdc379d067d5a9734aef84c39b
commit 236f564453e360fdc379d067d5a9734aef84c39b
Merge: ad137b5 6c67b81
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Dec 6 07:43:19 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Dec 6 07:43:19 2014 -0500

    Merge topic 'custom-command-multiple-outputs' into next
    
    6c67b816 Makefile: Workaround Borland Make bug with multiple outputs


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c67b8168cd44e5900982ca3e36049792934d83d
commit 6c67b8168cd44e5900982ca3e36049792934d83d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Dec 6 07:36:52 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Dec 6 07:36:52 2014 -0500

    Makefile: Workaround Borland Make bug with multiple outputs
    
    Given a rule of the form
    
      out1 out2: dep1
      out1 out2: dep2
    
    Borland Make complains that there are multiple rules for "out1"
    even though this works when there is only one output.  Instead
    generate
    
      out1 out2: dep1 dep2
    
    for Borland Make, but only when there are multiple outputs.

diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx
index 6c20952..950d440 100644
--- a/Source/cmGlobalBorlandMakefileGenerator.cxx
+++ b/Source/cmGlobalBorlandMakefileGenerator.cxx
@@ -49,6 +49,7 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
   lg->SetUnixCD(false);
   lg->SetMakeCommandEscapeTargetTwice(true);
   lg->SetBorlandMakeCurlyHack(true);
+  lg->SetNoMultiOutputMultiDepRules(true);
   return lg;
 }
 
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 56b2b97..812ded3 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -92,6 +92,7 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
   this->SkipAssemblySourceRules = false;
   this->MakeCommandEscapeTargetTwice = false;
   this->BorlandMakeCurlyHack = false;
+  this->NoMultiOutputMultiDepRules = false;
 }
 
 //----------------------------------------------------------------------------
@@ -696,6 +697,19 @@ cmLocalUnixMakefileGenerator3
     // No dependencies.  The commands will always run.
     os << cmMakeSafe(tgt) << space << ":\n";
     }
+  else if(this->NoMultiOutputMultiDepRules && outputs.size() >= 2)
+    {
+    // Borland make does not understand multiple dependency rules when
+    // there are multiple outputs, so write them all on one line.
+    os << cmMakeSafe(tgt) << space << ":";
+    for(std::vector<std::string>::const_iterator dep = depends.begin();
+        dep != depends.end(); ++dep)
+      {
+      replace = this->Convert(*dep, HOME_OUTPUT, MAKERULE);
+      os << " " << cmMakeSafe(replace);
+      }
+    os << "\n";
+    }
   else
     {
     // Split dependencies into multiple rule lines.  This allows for
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 65265ce..7c8e27f 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -161,6 +161,9 @@ public:
   void SetBorlandMakeCurlyHack(bool b)
     { this->BorlandMakeCurlyHack = b; }
 
+  void SetNoMultiOutputMultiDepRules(bool b)
+    { this->NoMultiOutputMultiDepRules = b; }
+
   // used in writing out Cmake files such as WriteDirectoryInformation
   static void WriteCMakeArgument(std::ostream& os, const char* s);
 
@@ -345,6 +348,7 @@ private:
   bool PassMakeflags;
   bool MakeCommandEscapeTargetTwice;
   bool BorlandMakeCurlyHack;
+  bool NoMultiOutputMultiDepRules;
   //==========================================================================
 
   std::string HomeRelativeOutputPath;

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

Summary of changes:
 Source/cmGlobalBorlandMakefileGenerator.cxx |    1 +
 Source/cmLocalUnixMakefileGenerator3.cxx    |   14 ++++++++++++++
 Source/cmLocalUnixMakefileGenerator3.h      |    4 ++++
 3 files changed, 19 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list