[Cmake-commits] CMake branch, next, updated. v2.8.2-971-g7a19502

Brad King brad.king at kitware.com
Thu Sep 30 09:23:10 EDT 2010


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  7a195027b9ea40fef243a2b324a8258c2e62ef8d (commit)
       via  448661fbe5c93fb1f59ea45847b3eef75e7b4a8a (commit)
      from  42d90ad6d45577b091debe160e2c8b488b114420 (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=7a195027b9ea40fef243a2b324a8258c2e62ef8d
commit 7a195027b9ea40fef243a2b324a8258c2e62ef8d
Merge: 42d90ad 448661f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 30 09:23:08 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 30 09:23:08 2010 -0400

    Merge topic 'vs10-empty-target' into next
    
    448661f VS10: Skip targets with no linker language (#11230)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=448661fbe5c93fb1f59ea45847b3eef75e7b4a8a
commit 448661fbe5c93fb1f59ea45847b3eef75e7b4a8a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 30 08:48:38 2010 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 30 08:48:38 2010 -0400

    VS10: Skip targets with no linker language (#11230)
    
    In targets with no non-header files the linker language cannot be
    determined.  Since the target project file cannot be generated at all in
    this case, give up as soon as it is detected.  Otherwise the generation
    code may try to run with uninitialized information.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 8dfafff..a92e56f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -125,7 +125,10 @@ void cmVisualStudio10TargetGenerator::Generate()
                             ".vcxproj");
   if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY)
     {
-    this->ComputeClOptions();
+    if(!this->ComputeClOptions())
+      {
+      return;
+      }
     }
   cmMakefile* mf = this->Target->GetMakefile();
   std::string path =  mf->GetStartOutputDirectory();
@@ -949,19 +952,23 @@ OutputLinkIncremental(std::string const& configName)
 }
 
 //----------------------------------------------------------------------------
-void cmVisualStudio10TargetGenerator::ComputeClOptions()
+bool cmVisualStudio10TargetGenerator::ComputeClOptions()
 {
   std::vector<std::string> const* configs =
     this->GlobalGenerator->GetConfigurations();
   for(std::vector<std::string>::const_iterator i = configs->begin();
       i != configs->end(); ++i)
     {
-    this->ComputeClOptions(*i);
+    if(!this->ComputeClOptions(*i))
+      {
+      return false;
+      }
     }
+  return true;
 }
 
 //----------------------------------------------------------------------------
-void cmVisualStudio10TargetGenerator::ComputeClOptions(
+bool cmVisualStudio10TargetGenerator::ComputeClOptions(
   std::string const& configName)
 {
   // much of this was copied from here:
@@ -984,7 +991,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
       cmSystemTools::Error
         ("CMake can not determine linker language for target:",
          this->Name.c_str());
-      return;
+      return false;
       }
     if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
        || strcmp(linkLanguage, "Fortran") == 0)
@@ -1044,6 +1051,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
     }
 
   this->ClOptions[configName] = pOptions.release();
+  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 64b2361..c3c27f4 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -50,8 +50,8 @@ private:
   void WriteObjSources();
   void WritePathAndIncrementalLinkOptions();
   void WriteItemDefinitionGroups();
-  void ComputeClOptions();
-  void ComputeClOptions(std::string const& configName);
+  bool ComputeClOptions();
+  bool ComputeClOptions(std::string const& configName);
   void WriteClOptions(std::string const& config,
                       std::vector<std::string> const & includes);
   void WriteRCOptions(std::string const& config,

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

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx |   18 +++++++++++++-----
 Source/cmVisualStudio10TargetGenerator.h   |    4 ++--
 2 files changed, 15 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list