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  892a53437ff2f626fdc19b568dd80eeb7a0a81a5 (commit)
       via  aff38945d64fc56026255c9cc3c1051529887d7b (commit)
       via  6ee6b17ed538989e38efb2eafb7f92c557eca71a (commit)
      from  fda5171148f691addee7d8c735c906d5eb086591 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=892a53437ff2f626fdc19b568dd80eeb7a0a81a5
commit 892a53437ff2f626fdc19b568dd80eeb7a0a81a5
Merge: fda5171 aff3894
Author:     Alexander Neundorf <neund...@kde.org>
AuthorDate: Wed Feb 24 17:10:37 2016 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Feb 24 17:10:37 2016 -0500

    Merge topic 'AddNewEclipseVersions' into next
    
    aff38945 Eclipse: only add C/CXX macros if the language is enabled
    6ee6b17e Eclipse: add newer version numbers


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aff38945d64fc56026255c9cc3c1051529887d7b
commit aff38945d64fc56026255c9cc3c1051529887d7b
Author:     Alex Neundorf <neund...@kde.org>
AuthorDate: Wed Feb 24 22:13:04 2016 +0100
Commit:     Alex Neundorf <neund...@kde.org>
CommitDate: Wed Feb 24 22:13:04 2016 +0100

    Eclipse: only add C/CXX macros if the language is enabled
    
    With this patch, the builtin macros and include dirs are only
    added to the project file if the C/CXX langauges are really enabled.
    I.e. before this patch the CXX-stuff was in the project file as soon
    as CXX had been enabled at least once for this build tree.
    I.e. disabling CXX later on did not remove the CXX macros etc.
    from the project file (related to #15150)
    
    Alex

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx 
b/Source/cmExtraEclipseCDT4Generator.cxx
index aedf6f4..133a85a 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -42,6 +42,8 @@ cmExtraEclipseCDT4Generator
   this->GenerateLinkedResources = true;
   this->SupportsGmakeErrorParser = true;
   this->SupportsMachO64Parser = true;
+  this->CEnabled = false;
+  this->CXXEnabled = false;
 }
 
 //----------------------------------------------------------------------------
@@ -64,10 +66,12 @@ void cmExtraEclipseCDT4Generator
       {
       this->Natures.insert("org.eclipse.cdt.core.ccnature");
       this->Natures.insert("org.eclipse.cdt.core.cnature");
+      this->CXXEnabled = true;
       }
     else if (*lit == "C")
       {
       this->Natures.insert("org.eclipse.cdt.core.cnature");
+      this->CEnabled = true;
       }
     else if (*lit == "Java")
       {
@@ -890,7 +894,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
   // add system defined c macros
   const char* cDefs=mf->GetDefinition(
                               "CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS");
-  if(cDefs)
+  if(this->CEnabled && cDefs)
     {
     // Expand the list.
     std::vector<std::string> defs;
@@ -925,7 +929,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
   // add system defined c++ macros
   const char* cxxDefs = mf->GetDefinition(
                             "CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS");
-  if(cxxDefs)
+  if(this->CXXEnabled && cxxDefs)
     {
     // Expand the list.
     std::vector<std::string> defs;
@@ -979,7 +983,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
   // CMakeSystemSpecificInformation.cmake. This makes Eclipse find the
   // standard headers.
   std::string compiler = mf->GetSafeDefinition("CMAKE_C_COMPILER");
-  if (!compiler.empty())
+  if (this->CEnabled && !compiler.empty())
     {
     std::string systemIncludeDirs = mf->GetSafeDefinition(
                                 "CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
@@ -988,7 +992,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
     this->AppendIncludeDirectories(fout, dirs, emmited);
     }
   compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
-  if (!compiler.empty())
+  if (this->CXXEnabled && !compiler.empty())
     {
     std::string systemIncludeDirs = mf->GetSafeDefinition(
                               "CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
diff --git a/Source/cmExtraEclipseCDT4Generator.h 
b/Source/cmExtraEclipseCDT4Generator.h
index 16675f2..1da2077 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -116,6 +116,8 @@ private:
   bool SupportsVirtualFolders;
   bool SupportsGmakeErrorParser;
   bool SupportsMachO64Parser;
+  bool CEnabled;
+  bool CXXEnabled;
 
 };
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ee6b17ed538989e38efb2eafb7f92c557eca71a
commit 6ee6b17ed538989e38efb2eafb7f92c557eca71a
Author:     Alex Neundorf <neund...@kde.org>
AuthorDate: Wed Feb 24 21:07:45 2016 +0100
Commit:     Alex Neundorf <neund...@kde.org>
CommitDate: Wed Feb 24 21:07:45 2016 +0100

    Eclipse: add newer version numbers
    
    Alex

diff --git a/Modules/CMakeFindEclipseCDT4.cmake 
b/Modules/CMakeFindEclipseCDT4.cmake
index 85c1fdf..5bf738a 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -30,6 +30,8 @@ function(_FIND_ECLIPSE_VERSION)
   set(_ECLIPSE_VERSION_NAME_3.7 "Indigo" )
   set(_ECLIPSE_VERSION_NAME_4.2 "Juno" )
   set(_ECLIPSE_VERSION_NAME_4.3 "Kepler" )
+  set(_ECLIPSE_VERSION_NAME_4.4 "Luna" )
+  set(_ECLIPSE_VERSION_NAME_4.5 "Mars" )
 
   if(NOT DEFINED CMAKE_ECLIPSE_VERSION)
     if(CMAKE_ECLIPSE_EXECUTABLE)
@@ -65,6 +67,8 @@ function(_FIND_ECLIPSE_VERSION)
                                                             "3.7 
(${_ECLIPSE_VERSION_NAME_3.7})"
                                                             "4.2 
(${_ECLIPSE_VERSION_NAME_4.2})"
                                                             "4.3 
(${_ECLIPSE_VERSION_NAME_4.3})"
+                                                            "4.4 
(${_ECLIPSE_VERSION_NAME_4.4})"
+                                                            "4.5 
(${_ECLIPSE_VERSION_NAME_4.5})"
               )
 endfunction()
 

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

Summary of changes:
 Modules/CMakeFindEclipseCDT4.cmake     |    4 ++++
 Source/cmExtraEclipseCDT4Generator.cxx |   12 ++++++++----
 Source/cmExtraEclipseCDT4Generator.h   |    2 ++
 3 files changed, 14 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to