[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3698-gd67cc53

Brad King brad.king at kitware.com
Tue Aug 6 10:22:36 EDT 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  d67cc53a2836d98bfc7941bfc6b27472377d135e (commit)
       via  eccb39d7f44f97d395b75b985b4e18178b72df8c (commit)
      from  016d4daba022d713beff5d3abf99c01b417ba40f (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=d67cc53a2836d98bfc7941bfc6b27472377d135e
commit d67cc53a2836d98bfc7941bfc6b27472377d135e
Merge: 016d4da eccb39d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 6 10:22:33 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 6 10:22:33 2013 -0400

    Merge topic 'vs-no-GetSourceFileWithOutput' into next
    
    eccb39d VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eccb39d7f44f97d395b75b985b4e18178b72df8c
commit eccb39d7f44f97d395b75b985b4e18178b72df8c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 6 10:17:37 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 6 10:20:03 2013 -0400

    VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
    
    Use the cmSourceFile returned by AddCustomCommandToOutput instead of
    throwing out the return value and looking it up with
    GetSourceFileWithOutput.

diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 667d86f..e5b4057 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -573,22 +573,20 @@ cmLocalVisualStudio6Generator
 
   // Add the rule with the given dependencies and commands.
   const char* no_main_dependency = 0;
-  this->Makefile->AddCustomCommandToOutput(output,
-                                       depends,
-                                       no_main_dependency,
-                                       origCommand.GetCommandLines(),
-                                       comment.c_str(),
-                                       origCommand.GetWorkingDirectory());
+  if(cmSourceFile* outsf =
+     this->Makefile->AddCustomCommandToOutput(
+       output, depends, no_main_dependency,
+       origCommand.GetCommandLines(), comment.c_str(),
+       origCommand.GetWorkingDirectory()))
+    {
+    target.AddSourceFile(outsf);
+    }
 
   // Replace the dependencies with the output of this rule so that the
   // next rule added will run after this one.
   depends.clear();
   depends.push_back(output);
 
-  // Add a source file representing this output to the project.
-  cmSourceFile* outsf = this->Makefile->GetSourceFileWithOutput(output);
-  target.AddSourceFile(outsf);
-
   // Free the fake output name.
   delete [] output;
 }
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 672edf4..2bb5ad0 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -146,11 +146,10 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
       force += "/";
       force += tgt.GetName();
       force += "_force";
-      this->Makefile->AddCustomCommandToOutput(force.c_str(), no_depends,
-                                               no_main_dependency,
-                                               force_commands, " ", 0, true);
       if(cmSourceFile* file =
-         this->Makefile->GetSourceFileWithOutput(force.c_str()))
+         this->Makefile->AddCustomCommandToOutput(
+           force.c_str(), no_depends, no_main_dependency,
+           force_commands, " ", 0, true))
         {
         tgt.AddSourceFile(file);
         }

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

Summary of changes:
 Source/cmLocalVisualStudio6Generator.cxx |   18 ++++++++----------
 Source/cmLocalVisualStudio7Generator.cxx |    7 +++----
 2 files changed, 11 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list