Pre-compute and store target object directory in cmGeneratorTarget

Add cmGeneratorTarget::ObjectDirectory member to hold the value.  In
ComputeTargetObjects set the value to the full path to the target object
directory including any necessary placeholder for the configuration
name.
This commit is contained in:
Brad King
2012-03-08 16:32:03 -05:00
parent 9c0a00d6dd
commit f737bd416a
3 changed files with 22 additions and 0 deletions
+16
View File
@@ -139,6 +139,22 @@ cmGlobalVisualStudioGenerator
}
gt->Objects[sf] = objectName;
}
std::string dir = gt->Makefile->GetCurrentOutputDirectory();
dir += "/";
std::string tgtDir = lg->GetTargetDirectory(*gt->Target);
if(!tgtDir.empty())
{
dir += tgtDir;
dir += "/";
}
const char* cd = this->GetCMakeCFGIntDir();
if(cd && *cd)
{
dir += cd;
dir += "/";
}
gt->ObjectDirectory = dir;
}
//----------------------------------------------------------------------------