[Cmake-commits] CMake branch, next, updated. v2.8.3-818-gf12dc41

Alexander Neundorf neundorf at kde.org
Sun Dec 12 10:56:30 EST 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  f12dc41ae44d20bbab965a439894081c66e4acca (commit)
       via  50d21d4251b179707b4569e5cfff0c9e65432273 (commit)
      from  535022eebeab876ada2399071e6541f85a6372b0 (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=f12dc41ae44d20bbab965a439894081c66e4acca
commit f12dc41ae44d20bbab965a439894081c66e4acca
Merge: 535022e 50d21d4
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Sun Dec 12 10:56:19 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Dec 12 10:56:19 2010 -0500

    Merge topic 'ParallelEclipseMakefiles2' into next
    
    50d21d4 Add cache var CMAKE_ECLIPSE_MAKE_ARGUMENTS when using the Eclipse generator


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50d21d4251b179707b4569e5cfff0c9e65432273
commit 50d21d4251b179707b4569e5cfff0c9e65432273
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Dec 12 16:52:20 2010 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Dec 12 16:52:20 2010 +0100

    Add cache var CMAKE_ECLIPSE_MAKE_ARGUMENTS when using the Eclipse generator
    
    This variable can be set to command line arguments which will be passed
    to make when eclipse invokes make, e.g. you can enter "-j8" to get
    8 parallel builds (#9930)
    
    Alex

diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index 836e4c9..b2a0299 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -17,6 +17,8 @@
 
 FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
 
+# This variable is used by the Eclipse generator and appended to the make invocation commands.
+SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
 
 # The Eclipse generator needs to know the standard include path
 # so that Eclipse ca find the headers at runtime and parsing etc. works better
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 8f89b5e..502fefa 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -734,6 +734,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
     ;
   emmited.clear();
   const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
+  const std::string makeArgs = mf->GetSafeDefinition(
+                                               "CMAKE_ECLIPSE_MAKE_ARGUMENTS");
   cmGlobalGenerator* generator
     = const_cast<cmGlobalGenerator*>(this->GlobalGenerator);
 
@@ -794,7 +796,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
            }
          if (insertTarget)
            {
-           this->AppendTarget(fout, ti->first, make, subdir, ": ");
+           this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
            }
          }
          break;
@@ -809,7 +811,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
            break;
            }
 
-         this->AppendTarget(fout, ti->first, make, subdir, ": ");
+         this->AppendTarget(fout, ti->first, make, makeArgs, subdir, ": ");
          break;
        case cmTarget::EXECUTABLE:
        case cmTarget::STATIC_LIBRARY:
@@ -818,10 +820,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
          {
          const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ?
                                                           "[exe] " : "[lib] ");
-         this->AppendTarget(fout, ti->first, make, subdir, prefix);
+         this->AppendTarget(fout, ti->first, make, makeArgs, subdir, prefix);
          std::string fastTarget = ti->first;
          fastTarget += "/fast";
-         this->AppendTarget(fout, fastTarget, make, subdir, prefix);
+         this->AppendTarget(fout, fastTarget, make, makeArgs, subdir, prefix);
          }
          break;
         // ignore these:
@@ -836,11 +838,11 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
     // insert the all and clean targets in every subdir
     if (!allTarget.empty())
       {
-      this->AppendTarget(fout, allTarget, make, subdir, ": ");
+      this->AppendTarget(fout, allTarget, make, makeArgs, subdir, ": ");
       }
     if (!cleanTarget.empty())
       {
-      this->AppendTarget(fout, cleanTarget, make, subdir, ": ");
+      this->AppendTarget(fout, cleanTarget, make, makeArgs, subdir, ": ");
       }
 
     //insert rules for compiling, preprocessing and assembling individual files
@@ -860,7 +862,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
         {
         prefix = "[pre] ";
         }
-      this->AppendTarget(fout, *fit, make, subdir, prefix);
+      this->AppendTarget(fout, *fit, make, makeArgs, subdir, prefix);
       }
     }
 
@@ -993,6 +995,7 @@ void cmExtraEclipseCDT4Generator
 void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
                                                const std::string&     target,
                                                const std::string&     make,
+                                               const std::string&     makeArgs,
                                                const std::string&     path,
                                                const char* prefix)
 {
@@ -1003,7 +1006,7 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
     "<buildCommand>"
     << cmExtraEclipseCDT4Generator::GetEclipsePath(make)
     << "</buildCommand>\n"
-    "<buildArguments/>\n"
+    "<buildArguments>"  << makeArgs << "</buildArguments>\n"
     "<buildTarget>" << target << "</buildTarget>\n"
     "<stopOnError>true</stopOnError>\n"
     "<useDefaultCommand>false</useDefaultCommand>\n"
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index 2ad599d..99e69c4 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -71,6 +71,7 @@ private:
   static void AppendTarget         (cmGeneratedFileStream& fout,
                                     const std::string&     target,
                                     const std::string&     make,
+                                    const std::string&     makeArguments,
                                     const std::string&     path,
                                     const char* prefix = "");
   static void AppendScannerProfile (cmGeneratedFileStream& fout,

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list