[Cmake-commits] CMake branch, next, updated. v3.2.0-rc2-759-ge101aa7

Brad King brad.king at kitware.com
Thu Feb 26 10:25:12 EST 2015


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  e101aa7d114e7e398b2bae3fd082857babc47a87 (commit)
       via  d1082448a8d0a75974920690dcbad8895169bfd6 (commit)
       via  ce935ebe50926bde199d86fbde4a78974a4043f9 (commit)
      from  96c192e36385a92ac6e614831fcfffd68c13976a (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=e101aa7d114e7e398b2bae3fd082857babc47a87
commit e101aa7d114e7e398b2bae3fd082857babc47a87
Merge: 96c192e d108244
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Feb 26 10:25:10 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 26 10:25:10 2015 -0500

    Merge topic 'cmake-build-ninja-verbose' into next
    
    d1082448 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'
    ce935ebe cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1082448a8d0a75974920690dcbad8895169bfd6
commit d1082448a8d0a75974920690dcbad8895169bfd6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Feb 26 10:21:09 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Feb 26 10:21:09 2015 -0500

    Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'

diff --git a/Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt b/Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt
new file mode 100644
index 0000000..83c62ec
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt
@@ -0,0 +1 @@
+-E echo CustomCommand
diff --git a/Tests/RunCMake/CommandLine/Build.cmake b/Tests/RunCMake/CommandLine/Build.cmake
new file mode 100644
index 0000000..20df108
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Build.cmake
@@ -0,0 +1,5 @@
+add_custom_command(
+  OUTPUT output.txt
+  COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt
+  )
+add_custom_target(CustomTarget ALL DEPENDS output.txt)
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 2be6651..a9c49e7 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -18,6 +18,22 @@ run_cmake_command(build-no-generator
 run_cmake_command(build-bad-generator
   ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator)
 
+if(RunCMake_GENERATOR STREQUAL "Ninja")
+  # Use a single build tree for a few tests without cleaning.
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Build-build)
+  set(RunCMake_TEST_NO_CLEAN 1)
+  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+  file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+  set(RunCMake_TEST_OPTIONS -DCMAKE_VERBOSE_MAKEFILE=1)
+  run_cmake(Build)
+  unset(RunCMake_TEST_OPTIONS)
+  run_cmake_command(Build-ninja-v ${CMAKE_COMMAND} --build .)
+
+  unset(RunCMake_TEST_BINARY_DIR)
+  unset(RunCMake_TEST_NO_CLEAN)
+endif()
+
 if(UNIX)
   run_cmake_command(E_create_symlink-missing-dir
     ${CMAKE_COMMAND} -E create_symlink T missing-dir/L

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce935ebe50926bde199d86fbde4a78974a4043f9
commit ce935ebe50926bde199d86fbde4a78974a4043f9
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Thu Feb 26 11:32:26 2015 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Feb 26 09:51:11 2015 -0500

    cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja
    
    The Ninja build system does not support a in-file verbositiy switch.
    Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE
    setting and pass it as an optional '-v' argument to Ninja.  This can
    serve as a reasonable fallback.
    
    Signed-off-by: Gregor Jasny <gjasny at googlemail.com>

diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 006239a..ee255af 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -664,7 +664,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
         globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram,
             installProjectName, installDirectory,
             globalGenerator->GetPreinstallTargetName(),
-            buildConfig, false);
+            buildConfig, false, false);
         std::string buildCommandStr =
           cmSystemTools::PrintSingleCommand(buildCommand);
         cmCPackLogger(cmCPackLog::LOG_DEBUG,
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 4cdce71..0827037 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -310,7 +310,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
       output, this->BuildMakeProgram,
       config,
       !this->BuildNoClean,
-      false, remainingTime);
+      false, false, remainingTime);
     out << output;
     // if the build failed then return
     if (retVal)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6147009..36395aa 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1677,14 +1677,14 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir,
     mf->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
   return this->Build(srcdir,bindir,projectName,
                      newTarget,
-                     output,"",config,false,fast,
+                     output,"",config,false,fast,false,
                      this->TryCompileTimeout);
 }
 
 void cmGlobalGenerator::GenerateBuildCommand(
   std::vector<std::string>& makeCommand, const std::string&,
   const std::string&, const std::string&, const std::string&,
-  const std::string&, bool,
+  const std::string&, bool, bool,
   std::vector<std::string> const&)
 {
   makeCommand.push_back(
@@ -1697,7 +1697,7 @@ int cmGlobalGenerator::Build(
   std::string& output,
   const std::string& makeCommandCSTR,
   const std::string& config,
-  bool clean, bool fast,
+  bool clean, bool fast, bool verbose,
   double timeout,
   cmSystemTools::OutputOption outputflag,
   std::vector<std::string> const& nativeOptions)
@@ -1722,7 +1722,7 @@ int cmGlobalGenerator::Build(
     {
     std::vector<std::string> cleanCommand;
     this->GenerateBuildCommand(cleanCommand, makeCommandCSTR, projectName,
-                               bindir, "clean", config, fast);
+                               bindir, "clean", config, fast, verbose);
     output += "\nRun Clean Command:";
     output += cmSystemTools::PrintSingleCommand(cleanCommand);
     output += "\n";
@@ -1745,7 +1745,8 @@ int cmGlobalGenerator::Build(
   // now build
   std::vector<std::string> makeCommand;
   this->GenerateBuildCommand(makeCommand, makeCommandCSTR, projectName,
-                             bindir, target, config, fast, nativeOptions);
+                             bindir, target, config, fast, verbose,
+                             nativeOptions);
   std::string makeCommandStr = cmSystemTools::PrintSingleCommand(makeCommand);
   output += "\nRun Build Command:";
   output += makeCommandStr;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 08f061a..5b9ddee 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -134,7 +134,7 @@ public:
             const std::string& projectName, const std::string& targetName,
             std::string& output,
             const std::string& makeProgram, const std::string& config,
-            bool clean, bool fast,
+            bool clean, bool fast, bool verbose,
             double timeout,
             cmSystemTools::OutputOption outputflag=cmSystemTools::OUTPUT_NONE,
             std::vector<std::string> const& nativeOptions =
@@ -144,7 +144,8 @@ public:
     std::vector<std::string>& makeCommand,
     const std::string& makeProgram,
     const std::string& projectName, const std::string& projectDir,
-    const std::string& targetName, const std::string& config, bool fast,
+    const std::string& targetName, const std::string& config,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 3c07be1..69b1a9d 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -574,12 +574,18 @@ void cmGlobalNinjaGenerator
                        const std::string& targetName,
                        const std::string& /*config*/,
                        bool /*fast*/,
+                       bool verbose,
                        std::vector<std::string> const& makeOptions)
 {
   makeCommand.push_back(
     this->SelectMakeProgram(makeProgram)
     );
 
+  if(verbose)
+    {
+    makeCommand.push_back("-v");
+    }
+
   makeCommand.insert(makeCommand.end(),
                      makeOptions.begin(), makeOptions.end());
   if(!targetName.empty())
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 3d443d8..c7bb782 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -196,7 +196,7 @@ public:
     const std::string& projectDir,
     const std::string& targetName,
     const std::string& config,
-    bool fast,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index e0ccaa9..1d2dd34 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -554,7 +554,7 @@ void cmGlobalUnixMakefileGenerator3
                        const std::string& /*projectDir*/,
                        const std::string& targetName,
                        const std::string& /*config*/,
-                       bool fast,
+                       bool fast, bool /*verbose*/,
                        std::vector<std::string> const& makeOptions)
 {
   makeCommand.push_back(
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index c61c36e..50a901e 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -114,7 +114,7 @@ public:
     const std::string& projectDir,
     const std::string& targetName,
     const std::string& config,
-    bool fast,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 531a714..7df2073 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -459,7 +459,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
   const std::string& projectDir,
   const std::string& targetName,
   const std::string& config,
-  bool fast,
+  bool fast, bool verbose,
   std::vector<std::string> const& makeOptions)
 {
   // Select the caller- or user-preferred make program, else MSBuild.
@@ -507,7 +507,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
     // Use devenv to build solutions containing Intel Fortran projects.
     cmGlobalVisualStudio7Generator::GenerateBuildCommand(
       makeCommand, makeProgram, projectName, projectDir,
-      targetName, config, fast, makeOptions);
+      targetName, config, fast, verbose, makeOptions);
     return;
     }
 
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 3b0a5cf..92202ba 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -41,7 +41,7 @@ public:
     const std::string& projectDir,
     const std::string& targetName,
     const std::string& config,
-    bool fast,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 455a7a2..62a308e 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -120,7 +120,7 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand(
   const std::string& /*projectDir*/,
   const std::string& targetName,
   const std::string& config,
-  bool /*fast*/,
+  bool /*fast*/, bool /*verbose*/,
   std::vector<std::string> const& makeOptions
   )
 {
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index 58efb25..a59a0b2 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -59,7 +59,7 @@ public:
     const std::string& projectDir,
     const std::string& targetName,
     const std::string& config,
-    bool fast,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 401e475..0e0e63a 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -191,7 +191,7 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
   const std::string& /*projectDir*/,
   const std::string& targetName,
   const std::string& config,
-  bool /*fast*/,
+  bool /*fast*/, bool /*verbose*/,
   std::vector<std::string> const& makeOptions)
 {
   // Select the caller- or user-preferred make program, else devenv.
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index b591653..d641c02 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -69,7 +69,7 @@ public:
     const std::string& projectDir,
     const std::string& targetName,
     const std::string& config,
-    bool fast,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index aea134e..e89161d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -310,7 +310,7 @@ cmGlobalXCodeGenerator::GenerateBuildCommand(
   const std::string& /*projectDir*/,
   const std::string& targetName,
   const std::string& config,
-  bool /*fast*/,
+  bool /*fast*/, bool /*verbose*/,
   std::vector<std::string> const& makeOptions)
 {
   // now build the test
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index f513e28..b272f6a 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -60,7 +60,7 @@ public:
     const std::string& projectDir,
     const std::string& targetName,
     const std::string& config,
-    bool fast,
+    bool fast, bool verbose,
     std::vector<std::string> const& makeOptions = std::vector<std::string>()
     );
 
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 47be481..80e90a8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2789,11 +2789,16 @@ int cmake::Build(const std::string& dir,
     return 1;
     }
   projName = it.GetValue();
+  bool verbose = false;
+  if(it.Find("CMAKE_VERBOSE_MAKEFILE"))
+    {
+    verbose = it.GetValueAsBool();
+    }
   return gen->Build("", dir,
                     projName, target,
                     output,
                     "",
-                    config, clean, false, 0,
+                    config, clean, false, verbose, 0,
                     cmSystemTools::OUTPUT_PASSTHROUGH,
                     nativeOptions);
 }

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

Summary of changes:
 Source/CPack/cmCPackGenerator.cxx                   |    2 +-
 Source/CTest/cmCTestBuildAndTestHandler.cxx         |    2 +-
 Source/cmGlobalGenerator.cxx                        |   11 ++++++-----
 Source/cmGlobalGenerator.h                          |    5 +++--
 Source/cmGlobalNinjaGenerator.cxx                   |    6 ++++++
 Source/cmGlobalNinjaGenerator.h                     |    2 +-
 Source/cmGlobalUnixMakefileGenerator3.cxx           |    2 +-
 Source/cmGlobalUnixMakefileGenerator3.h             |    2 +-
 Source/cmGlobalVisualStudio10Generator.cxx          |    4 ++--
 Source/cmGlobalVisualStudio10Generator.h            |    2 +-
 Source/cmGlobalVisualStudio6Generator.cxx           |    2 +-
 Source/cmGlobalVisualStudio6Generator.h             |    2 +-
 Source/cmGlobalVisualStudio7Generator.cxx           |    2 +-
 Source/cmGlobalVisualStudio7Generator.h             |    2 +-
 Source/cmGlobalXCodeGenerator.cxx                   |    2 +-
 Source/cmGlobalXCodeGenerator.h                     |    2 +-
 Source/cmake.cxx                                    |    7 ++++++-
 Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt |    1 +
 Tests/RunCMake/CommandLine/Build.cmake              |    5 +++++
 Tests/RunCMake/CommandLine/RunCMakeTest.cmake       |   16 ++++++++++++++++
 20 files changed, 57 insertions(+), 22 deletions(-)
 create mode 100644 Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt
 create mode 100644 Tests/RunCMake/CommandLine/Build.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list