[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-442-gb142dca
Brad King
brad.king at kitware.com
Thu Jun 11 15:34:04 EDT 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 b142dcad64a324b652929f426e2ac59a32dde0c8 (commit)
via 55d86fe893b47d5a464e94aa25b055dac65f33ee (commit)
from 60e4e1924e9a23bad42cd5130cedb0881cec6c0b (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=b142dcad64a324b652929f426e2ac59a32dde0c8
commit b142dcad64a324b652929f426e2ac59a32dde0c8
Merge: 60e4e19 55d86fe
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 11 15:34:03 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 11 15:34:03 2015 -0400
Merge topic 'compiler-launcher' into next
55d86fe8 fixup! Add options to launch the compiler through tools like ccache or distcc
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55d86fe893b47d5a464e94aa25b055dac65f33ee
commit 55d86fe893b47d5a464e94aa25b055dac65f33ee
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 11 15:32:59 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 11 15:32:59 2015 -0400
fixup! Add options to launch the compiler through tools like ccache or distcc
diff --git a/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst b/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst
index 808422d..7961f60 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst
@@ -1,5 +1,5 @@
CMAKE_<LANG>_COMPILER_LAUNCHER
----------------------------------
+------------------------------
Default value for :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property.
This variable is used to initialize the property on each target as it is
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index f820b74..481f4fe 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -784,15 +784,12 @@ cmMakefileTargetGenerator
{
std::vector<std::string> launcher_cmd;
cmSystemTools::ExpandListArgument(clauncher, launcher_cmd, true);
- std::string run_launcher =
- this->LocalGenerator->EscapeForShell(launcher_cmd[0]);
- // now put any arguments in if they exist
- for(size_t i =1; i < launcher_cmd.size(); ++i)
+ for (std::vector<std::string>::iterator i = launcher_cmd.begin(),
+ e = launcher_cmd.end(); i != e; ++i)
{
- run_launcher += " ";
- run_launcher += launcher_cmd[i];
+ *i = this->LocalGenerator->EscapeForShell(*i);
}
- run_launcher += " ";
+ std::string const& run_launcher = cmJoin(launcher_cmd, " ") + " ";
compileCommands.front().insert(0, run_launcher);
}
}
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 095e1f7..bb75e09 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -22,6 +22,7 @@
#include "cmComputeLinkInformation.h"
#include "cmSourceFile.h"
#include "cmCustomCommandGenerator.h"
+#include "cmAlgorithms.h"
#include <algorithm>
@@ -475,7 +476,7 @@ cmNinjaTargetGenerator
}
}
- // Maybe insert a compiler launcher like ccache or distcc
+ // Maybe insert a compiler launcher like ccache or distcc
if (!compileCmds.empty() && (lang == "C" || lang == "CXX"))
{
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
@@ -484,15 +485,12 @@ cmNinjaTargetGenerator
{
std::vector<std::string> launcher_cmd;
cmSystemTools::ExpandListArgument(clauncher, launcher_cmd, true);
- std::string run_launcher =
- this->LocalGenerator->EscapeForShell(launcher_cmd[0]);
- // now put any arguments in if they exist
- for(size_t i =1; i < launcher_cmd.size(); ++i)
+ for (std::vector<std::string>::iterator i = launcher_cmd.begin(),
+ e = launcher_cmd.end(); i != e; ++i)
{
- run_launcher += " ";
- run_launcher += launcher_cmd[i];
+ *i = this->LocalGenerator->EscapeForShell(*i);
}
- run_launcher += " ";
+ std::string const& run_launcher = cmJoin(launcher_cmd, " ") + " ";
compileCmds.front().insert(0, run_launcher);
}
}
@@ -509,6 +507,7 @@ cmNinjaTargetGenerator
std::string cmdLine =
this->GetLocalGenerator()->BuildCommandLine(compileCmds);
+
// Write the rule for compiling file of the given language.
std::ostringstream comment;
comment << "Rule for compiling " << lang << " files.";
-----------------------------------------------------------------------
Summary of changes:
Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst | 2 +-
Source/cmMakefileTargetGenerator.cxx | 11 ++++-------
Source/cmNinjaTargetGenerator.cxx | 15 +++++++--------
3 files changed, 12 insertions(+), 16 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list