[Cmake-commits] CMake branch, next, updated. v3.2.2-2344-g1ed4af3

Brad King brad.king at kitware.com
Thu Apr 30 09:09:18 EDT 2015


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  1ed4af35ab4d811ca4bc2a75b5f44facec597f2c (commit)
       via  27343e3b68e0aa0c923f1ad666575ed40efed211 (commit)
      from  d98fde519e88e42992fa174bf033d6a3c431b6c5 (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=1ed4af35ab4d811ca4bc2a75b5f44facec597f2c
commit 1ed4af35ab4d811ca4bc2a75b5f44facec597f2c
Merge: d98fde5 27343e3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 30 09:09:17 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 30 09:09:17 2015 -0400

    Merge topic 'fix-cmState-try_compile-languages' into next
    
    27343e3b cmGlobalGenerator: Finish storing enabled languages in cmState


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27343e3b68e0aa0c923f1ad666575ed40efed211
commit 27343e3b68e0aa0c923f1ad666575ed40efed211
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 30 08:56:48 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 30 09:08:25 2015 -0400

    cmGlobalGenerator: Finish storing enabled languages in cmState
    
    In commit 74de9a73 (cmGlobalGenerator: Delegate storage of enabled
    languages to cmState, 2015-04-11) the original LanguageEnabled
    member of cmGlobalGenerator was left behind by mistake.  One use
    of it in EnableLanguagesFromGenerator (for try_compile) was left,
    but the member is not populated anymore.  Drop the member and
    teach EnableLanguagesFromGenerator to copy the list of enabled
    languages from one cmState to the other.
    
    Reported-by: Matt McCormick <matt.mccormick at kitware.com>

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ab044c1..243f61a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1896,7 +1896,9 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
                                           "make program",
                                           cmState::FILEPATH);
   // copy the enabled languages
-  this->LanguageEnabled = gen->LanguageEnabled;
+  this->GetCMakeInstance()->GetState()->SetEnabledLanguages(
+    gen->GetCMakeInstance()->GetState()->GetEnabledLanguages()
+    );
   this->LanguagesReady = gen->LanguagesReady;
   this->ExtensionToLanguage = gen->ExtensionToLanguage;
   this->IgnoreExtensions = gen->IgnoreExtensions;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ce3f037..ef1865f 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -441,7 +441,6 @@ private:
   // If you add a new map here, make sure it is copied
   // in EnableLanguagesFromGenerator
   std::map<std::string, bool> IgnoreExtensions;
-  std::vector<std::string> LanguageEnabled;
   std::set<std::string> LanguagesReady; // Ready for try_compile
   std::map<std::string, std::string> OutputExtensions;
   std::map<std::string, std::string> LanguageToOutputExtension;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 96f8a51..7ff2cff 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -272,6 +272,11 @@ std::vector<std::string> cmState::GetEnabledLanguages() const
   return this->EnabledLanguages;
 }
 
+void cmState::SetEnabledLanguages(std::vector<std::string> const& langs)
+{
+  this->EnabledLanguages = langs;
+}
+
 void cmState::ClearEnabledLanguages()
 {
   this->EnabledLanguages.clear();
diff --git a/Source/cmState.h b/Source/cmState.h
index 34b2ccf..2353671 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -77,6 +77,7 @@ public:
   void SetLanguageEnabled(std::string const& l);
   bool GetLanguageEnabled(std::string const& l) const;
   std::vector<std::string> GetEnabledLanguages() const;
+  void SetEnabledLanguages(std::vector<std::string> const& langs);
   void ClearEnabledLanguages();
 
   bool GetIsInTryCompile() const;

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

Summary of changes:
 Source/cmGlobalGenerator.cxx |    4 +++-
 Source/cmGlobalGenerator.h   |    1 -
 Source/cmState.cxx           |    5 +++++
 Source/cmState.h             |    1 +
 4 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list