summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-02 18:28:12 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-02 18:28:12 (GMT)
commitac9b7ec1558e1370f578c67b1296fbe778a92b81 (patch)
tree8fe4990c6e318e0bdbf136dcf805e817c024440d /Source/cmLocalUnixMakefileGenerator3.cxx
parent7d6a5e097f17720ed21fe5faac1759bf387c7880 (diff)
downloadCMake-ac9b7ec1558e1370f578c67b1296fbe778a92b81.zip
CMake-ac9b7ec1558e1370f578c67b1296fbe778a92b81.tar.gz
CMake-ac9b7ec1558e1370f578c67b1296fbe778a92b81.tar.bz2
ENH: Refactor custom command rule hashing
This simplifies computation of custom command rule hashes to hash content exactly chosen as the custom commands are generated. Unfortunately this will change the hashes of existing build trees from earlier CMake versions, but this is not a big deal. The change is necessary so that in the future we can make optional adjustments to custom command lines at generate time without changing the hashes every time the option is changed.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 9517cd8..fad722d 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -968,7 +968,8 @@ void
cmLocalUnixMakefileGenerator3
::AppendCustomCommand(std::vector<std::string>& commands,
const cmCustomCommand& cc, bool echo_comment,
- cmLocalGenerator::RelativeRoot relative)
+ cmLocalGenerator::RelativeRoot relative,
+ std::ostream* content)
{
// Optionally create a command to display the custom command's
// comment text. This is used for pre-build, pre-link, and
@@ -991,6 +992,10 @@ cmLocalUnixMakefileGenerator3
{
dir = workingDir;
}
+ if(content)
+ {
+ *content << dir;
+ }
bool escapeOldStyle = cc.GetEscapeOldStyle();
bool escapeAllowMakeVars = cc.GetEscapeAllowMakeVars();
@@ -1048,6 +1053,10 @@ cmLocalUnixMakefileGenerator3
escapeAllowMakeVars);
}
}
+ if(content)
+ {
+ *content << cmd;
+ }
if(this->BorlandMakeCurlyHack)
{
// Borland Make has a very strange bug. If the first curly