[Cmake-commits] CMake branch, next, updated. v2.8.6-1957-gbca5aa9

Alexander Neundorf neundorf at kde.org
Sat Nov 19 05:25:46 EST 2011


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  bca5aa95663745afae25c0d9bfe7a69970fe56ee (commit)
       via  982b766f29086b851fb4aee891e5e6d4bae95eb9 (commit)
       via  1110e455c20598983bbf435bd9356c1a952e305a (commit)
      from  155bd0c36fb8433aaa7ee767133bcad38a01425c (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=bca5aa95663745afae25c0d9bfe7a69970fe56ee
commit bca5aa95663745afae25c0d9bfe7a69970fe56ee
Merge: 155bd0c 982b766
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Sat Nov 19 05:25:33 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Nov 19 05:25:33 2011 -0500

    Merge topic 'EclipseImprovedSourceProject' into next
    
    982b766 Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
    1110e45 Eclipse: create links to subprojects also in the source-project (#12579)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=982b766f29086b851fb4aee891e5e6d4bae95eb9
commit 982b766f29086b851fb4aee891e5e6d4bae95eb9
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Nov 19 11:18:51 2011 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sat Nov 19 11:18:51 2011 +0100

    Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
    
    Previously ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT was used, but the
    new name CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT is more in line with
    the general naming conventions in cmake, and, more importantly IMO,
    in cmake-gui it now appears right next to the other eclipse-related
    variables, which all start with CMAKE_ECLIPSE_.
    
    A warning is printed if the old variable is TRUE and the new one isn't,
    so users should notice that they have to enable the new one.
    
    Alex

diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index f7a6e29..dd06128 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -70,8 +70,8 @@ ENDIF()
 SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
 
 # This variable is used by the Eclipse generator in out-of-source builds only.
-SET(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
-MARK_AS_ADVANCED(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT)
+SET(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
+MARK_AS_ADVANCED(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
 
 # Determine builtin macros and include dirs:
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 2e4e68f..07549e9 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -85,7 +85,16 @@ void cmExtraEclipseCDT4Generator::Generate()
   this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory);
 
   this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
-                            mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT"));
+                            mf->IsOn("CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT"));
+
+  if ((this->GenerateSourceProject == false)
+    && (mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT")))
+    {
+    mf->IssueMessage(cmake::WARNING,
+              "ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT is set to TRUE, "
+              "but this variable is not supported anymore since CMake 2.8.7.\n"
+              "Enable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT instead.");
+    }
 
   if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
                                     this->HomeDirectory.c_str()))

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1110e455c20598983bbf435bd9356c1a952e305a
commit 1110e455c20598983bbf435bd9356c1a952e305a
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Nov 19 11:01:03 2011 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sat Nov 19 11:01:03 2011 +0100

    Eclipse: create links to subprojects also in the source-project (#12579)
    
    Alex

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 248a30a..2e4e68f 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -113,7 +113,7 @@ void cmExtraEclipseCDT4Generator::Generate()
   this->CreateCProjectFile();
 }
 
-void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() const
+void cmExtraEclipseCDT4Generator::CreateSourceProjectFile()
 {
   assert(this->HomeDirectory != this->HomeOutputDirectory);
 
@@ -141,6 +141,16 @@ void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() const
     "\t</buildSpec>\n"
     "\t<natures>\n"
     "\t</natures>\n"
+    "\t<linkedResources>\n";
+
+  if (this->SupportsVirtualFolders)
+    {
+    this->CreateLinksToSubprojects(fout, this->HomeDirectory);
+    this->SrcLinkedResources.clear();
+    }
+
+  fout <<
+    "\t</linkedResources>\n"
     "</projectDescription>\n"
     ;
 }
@@ -434,7 +444,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
 
   if (this->SupportsVirtualFolders)
     {
-    this->CreateLinksToSubprojects(fout);
+    this->CreateLinksToSubprojects(fout, this->HomeOutputDirectory);
 
     this->CreateLinksForTargets(fout);
     }
@@ -541,7 +551,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
 
 //----------------------------------------------------------------------------
 void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
-                                                   cmGeneratedFileStream& fout)
+                       cmGeneratedFileStream& fout, const std::string& baseDir)
 {
   // for each sub project create a linked resource to the source dir
   // - only if it is an out-of-source build
@@ -557,8 +567,8 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
                             it->second[0]->GetMakefile()->GetStartDirectory());
     // a linked resource must not point to a parent directory of .project or
     // .project itself
-    if ((this->HomeOutputDirectory != linkSourceDirectory) &&
-        !cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
+    if ((baseDir != linkSourceDirectory) &&
+        !cmSystemTools::IsSubDirectory(baseDir.c_str(),
                                        linkSourceDirectory.c_str()))
       {
       std::string linkName = "[Subprojects]/";
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index 61302e7..ebd8c08 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -46,7 +46,7 @@ public:
 
 private:
   // create .project file in the source tree
-  void CreateSourceProjectFile() const;
+  void CreateSourceProjectFile();
 
   // create .project file
   void CreateProjectFile();
@@ -104,7 +104,8 @@ private:
   static void AddEnvVar(cmGeneratedFileStream& fout, const char* envVar,
                         cmMakefile* mf);
 
-  void CreateLinksToSubprojects(cmGeneratedFileStream& fout);
+  void CreateLinksToSubprojects(cmGeneratedFileStream& fout,
+                                const std::string& baseDir);
   void CreateLinksForTargets(cmGeneratedFileStream& fout);
 
   std::vector<std::string> SrcLinkedResources;

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

Summary of changes:
 Modules/CMakeFindEclipseCDT4.cmake     |    4 ++--
 Source/cmExtraEclipseCDT4Generator.cxx |   31 +++++++++++++++++++++++++------
 Source/cmExtraEclipseCDT4Generator.h   |    5 +++--
 3 files changed, 30 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list