From 3d68dd230d84a1faac9b4d6750ec36cba3c6f8a2 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 29 Sep 2010 17:02:04 -0400 Subject: [PATCH] Fix for bug #11274, VS10 custom commands that create files in INTDIR fix. --- Source/cmMakefile.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c64053aa7..ef1511319 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -894,6 +894,14 @@ cmMakefile::AddCustomCommandToOutput(const std::vector& 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)