summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-09-29 21:02:04 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2010-09-29 21:02:04 (GMT)
commit3d68dd230d84a1faac9b4d6750ec36cba3c6f8a2 (patch)
treeeb87625a238d85b4a05cd75a47261274e6d4d7e4 /Source/cmMakefile.cxx
parentda5c8953b72028cfdf9090857b7012cad04e4bfa (diff)
downloadCMake-3d68dd230d84a1faac9b4d6750ec36cba3c6f8a2.zip
CMake-3d68dd230d84a1faac9b4d6750ec36cba3c6f8a2.tar.gz
CMake-3d68dd230d84a1faac9b4d6750ec36cba3c6f8a2.tar.bz2
Fix for bug #11274, VS10 custom commands that create files in INTDIR fix.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c64053a..ef15113 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -894,6 +894,14 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
// Construct a rule file associated with the first output produced.
std::string outName = outputs[0];
outName += ".rule";
+ const char* dir =
+ this->LocalGenerator->GetGlobalGenerator()->
+ GetCMakeCFGInitDirectory();
+ if(dir && dir[0] == '$')
+ {
+ cmSystemTools::ReplaceString(outName, dir,
+ cmake::GetCMakeFilesDirectory());
+ }
// Check if the rule file already exists.
file = this->GetSource(outName.c_str());
if(file && file->GetCustomCommand() && !replace)