[Cmake-commits] CMake branch, next, updated. v2.8.6-1759-g8da9c7f

Alexander Neundorf neundorf at kde.org
Tue Nov 1 16:16:59 EDT 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  8da9c7fa10af691853a9d9acce36836f5ca4cb19 (commit)
       via  4b930220be0c0b2391a33336a37525154f6b402d (commit)
      from  b447c1d1dbdd3b6adebae779eedf0ca4fbde329b (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=8da9c7fa10af691853a9d9acce36836f5ca4cb19
commit 8da9c7fa10af691853a9d9acce36836f5ca4cb19
Merge: b447c1d 4b93022
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Tue Nov 1 16:16:45 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 1 16:16:45 2011 -0400

    Merge topic 'EclipseWarnIfBuildDirIsSubDirOfSrcDir' into next
    
    4b93022 Eclipse: warn if CMAKE_BINARY_DIR is subdir of CMAKE_SOURCE_DIR


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b930220be0c0b2391a33336a37525154f6b402d
commit 4b930220be0c0b2391a33336a37525154f6b402d
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Nov 1 10:41:23 2011 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Nov 1 21:13:35 2011 +0100

    Eclipse: warn if CMAKE_BINARY_DIR is subdir of CMAKE_SOURCE_DIR
    
    Eclipse doesn't handle this case well. When doing out-of-source builds
    we create a linked resource which points to CMAKE_SOURCE_DIR, so the
    user can browse the source dir in Eclipse. This is not possible
    when the build dir is a subdir of the source dir.
    
    Alex

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 785e85a..0667da7 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -87,6 +87,16 @@ void cmExtraEclipseCDT4Generator::Generate()
   this->GenerateSourceProject = (this->IsOutOfSourceBuild &&
                             mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT"));
 
+  if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
+                                    this->HomeDirectory.c_str()))
+    {
+    mf->IssueMessage(cmake::WARNING, "The build directory is a subdirectory "
+                     "of the source directory.\n"
+                     "This is not supported well by Eclipse. It is strongly "
+                     "recommended to use a build directory which is a "
+                     "sibling of the source directory.");
+    }
+
   // NOTE: This is not good, since it pollutes the source tree. However,
   //       Eclipse doesn't allow CVS/SVN to work when the .project is not in
   //       the cvs/svn root directory. Hence, this is provided as an option.

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list