|
@@ -948,17 +948,11 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
|
|
|
// Generate a rule file if the main dependency is not available.
|
|
// Generate a rule file if the main dependency is not available.
|
|
|
if(!file)
|
|
if(!file)
|
|
|
{
|
|
{
|
|
|
|
|
+ cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
|
|
|
|
|
+
|
|
|
// Construct a rule file associated with the first output produced.
|
|
// Construct a rule file associated with the first output produced.
|
|
|
- std::string outName = outputs[0];
|
|
|
|
|
- outName += ".rule";
|
|
|
|
|
- const char* dir =
|
|
|
|
|
- this->LocalGenerator->GetGlobalGenerator()->
|
|
|
|
|
- GetCMakeCFGIntDir();
|
|
|
|
|
- if(dir && dir[0] == '$')
|
|
|
|
|
- {
|
|
|
|
|
- cmSystemTools::ReplaceString(outName, dir,
|
|
|
|
|
- cmake::GetCMakeFilesDirectory());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ std::string outName = gg->GenerateRuleFile(outputs[0]);
|
|
|
|
|
+
|
|
|
// Check if the rule file already exists.
|
|
// Check if the rule file already exists.
|
|
|
file = this->GetSource(outName.c_str());
|
|
file = this->GetSource(outName.c_str());
|
|
|
if(file && file->GetCustomCommand() && !replace)
|
|
if(file && file->GetCustomCommand() && !replace)
|