[Cmake-commits] CMake branch, next, updated. v2.8.8-3343-g01d972a

Bill Hoffman bill.hoffman at kitware.com
Thu Jun 28 13:05:56 EDT 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  01d972abfce9c8d4fd73993101cc1d38c2bc6451 (commit)
       via  e16f58ddd6aea9bebc6b4a914eed54cf7517ff61 (commit)
      from  b1f4abf6168623e749356665c7503590959e1335 (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=01d972abfce9c8d4fd73993101cc1d38c2bc6451
commit 01d972abfce9c8d4fd73993101cc1d38c2bc6451
Merge: b1f4abf e16f58d
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Jun 28 13:05:54 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 28 13:05:54 2012 -0400

    Merge topic 'fix_vs10_rerunning_custom_targets' into next
    
    e16f58d VS 10 requires that symbolic files for custom targets exist.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e16f58ddd6aea9bebc6b4a914eed54cf7517ff61
commit e16f58ddd6aea9bebc6b4a914eed54cf7517ff61
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Jun 28 13:03:09 2012 -0400
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu Jun 28 13:03:09 2012 -0400

    VS 10 requires that symbolic files for custom targets exist.
    
    Without this change, add_custom_target will always run its empty
    command with each build.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9a97ab0..396158b 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -571,6 +571,24 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
     {
     cmSourceFile* sf = *s; 
     std::string const& source = sf->GetFullPath();
+    // VS 10 will always rebuild a custom target if its symbolic
+    // file doesn't exist so create the file explicitly.
+    if(sf->GetPropertyAsBool("SYMBOLIC"))
+      {
+      if(!cmSystemTools::FileExists(source.c_str()))
+        {
+        // Make sure the path exists for the file
+        std::string path = cmSystemTools::GetFilenamePath(source);
+        cmSystemTools::MakeDirectory(path.c_str());
+        std::ofstream fout(source.c_str());
+        if(fout)
+          {
+          fout << "# generated from CMake\n";
+          fout.flush();
+          fout.close();
+          }
+        }
+      }
     cmSourceGroup& sourceGroup = 
       this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
     groupsUsed.insert(&sourceGroup);

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

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list