[Cmake-commits] CMake branch, next, updated. v2.8.11-2125-g22e4b14

Brad King brad.king at kitware.com
Tue May 21 15:29:38 EDT 2013


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  22e4b1463f8556442bdf375b4308b0e623ad3f5f (commit)
       via  db4350232639d9356c4bf5af6a91d71e5d45c93e (commit)
      from  25bc5deb7b43e9e7047ed27545c38c88013bb57f (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=22e4b1463f8556442bdf375b4308b0e623ad3f5f
commit 22e4b1463f8556442bdf375b4308b0e623ad3f5f
Merge: 25bc5de db43502
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue May 21 15:29:37 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue May 21 15:29:37 2013 -0400

    Merge topic 'ctest-parallel-env' into next
    
    db43502 CTest: Read CTEST_PARALLEL_LEVEL from environment


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db4350232639d9356c4bf5af6a91d71e5d45c93e
commit db4350232639d9356c4bf5af6a91d71e5d45c93e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 17 15:26:57 2013 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue May 21 15:27:09 2013 -0400

    CTest: Read CTEST_PARALLEL_LEVEL from environment
    
    If no explicit "-j <n>" option is given on the command line then read
    the parallel level from an environment variable.

diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 9a042c4..69ffb97 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -294,6 +294,7 @@ cmCTest::cmCTest()
 {
   this->LabelSummary           = true;
   this->ParallelLevel          = 1;
+  this->ParallelLevelSetInCli  = false;
   this->SubmitIndex            = 0;
   this->Failover               = false;
   this->BatchJobs              = false;
@@ -1999,11 +2000,13 @@ void cmCTest::HandleCommandLineArguments(size_t &i,
     i++;
     int plevel = atoi(args[i].c_str());
     this->SetParallelLevel(plevel);
+    this->ParallelLevelSetInCli = true;
     }
   else if(arg.find("-j") == 0)
     {
     int plevel = atoi(arg.substr(2).c_str());
     this->SetParallelLevel(plevel);
+    this->ParallelLevelSetInCli = true;
     }
 
   if(this->CheckArgument(arg, "--no-compress-output"))
@@ -2398,6 +2401,14 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
       }
     } // the close of the for argument loop
 
+  if (!this->ParallelLevelSetInCli)
+    {
+    if (const char *parallel = cmSystemTools::GetEnv("CTEST_PARALLEL_LEVEL"))
+      {
+      int plevel = atoi(parallel);
+      this->SetParallelLevel(plevel);
+      }
+    }
 
   // now what sould cmake do? if --build-and-test was specified then
   // we run the build and test handler and return
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 587a6db..5dd35ce 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -485,6 +485,7 @@ private:
   int                     MaxTestNameWidth;
 
   int                     ParallelLevel;
+  bool                    ParallelLevelSetInCli;
 
   int                     CompatibilityMode;
 
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 285ec17..e767a16 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -71,7 +71,8 @@ static const char * cmDocumentationOptions[][3] =
   {"-j <jobs>, --parallel <jobs>", "Run the tests in parallel using the"
    "given number of jobs.",
    "This option tells ctest to run the tests in parallel using given "
-   "number of jobs."},
+   "number of jobs.  This option can also be set by setting "
+   "the environment variable CTEST_PARALLEL_LEVEL."},
   {"-Q,--quiet", "Make ctest quiet.",
     "This option will suppress all the output. The output log file will "
     "still be generated if the --output-log is specified. Options such "

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list