mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 09:08:58 -05:00
cmRulePlaceholderExpander: expand <TARGET_SUPPORT_DIR> placeholders
This commit is contained in:
@@ -2358,6 +2358,7 @@ cmGeneratorTarget::GetClassifiedFlagsForSource(cmSourceFile const* sf,
|
||||
vars.Object = sfVars.ObjectFileDir.c_str();
|
||||
vars.ObjectDir = sfVars.ObjectDir.c_str();
|
||||
vars.ObjectFileDir = sfVars.ObjectFileDir.c_str();
|
||||
vars.TargetSupportDir = sfVars.TargetSupportDir.c_str();
|
||||
vars.Flags = PlaceholderFlags.c_str();
|
||||
vars.DependencyFile = sfVars.DependencyFile.c_str();
|
||||
vars.DependencyTarget = sfVars.DependencyTarget.c_str();
|
||||
@@ -2438,12 +2439,16 @@ cmGeneratorTarget::SourceVariables cmGeneratorTarget::GetSourceVariables(
|
||||
|
||||
// Object settings.
|
||||
{
|
||||
std::string const targetSupportDir = lg->MaybeRelativeToTopBinDir(
|
||||
gg->ConvertToOutputPath(this->GetCMFSupportDirectory()));
|
||||
std::string const objectDir = gg->ConvertToOutputPath(
|
||||
cmStrCat(this->GetSupportDirectory(), gg->GetConfigDirectory(config)));
|
||||
std::string const objectFileName = this->GetObjectName(sf);
|
||||
std::string const objectFilePath =
|
||||
cmStrCat(objectDir, '/', objectFileName);
|
||||
|
||||
vars.TargetSupportDir =
|
||||
lg->ConvertToOutputFormat(targetSupportDir, cmOutputConverter::SHELL);
|
||||
vars.ObjectDir =
|
||||
lg->ConvertToOutputFormat(objectDir, cmOutputConverter::SHELL);
|
||||
vars.ObjectFileDir =
|
||||
|
||||
@@ -566,6 +566,7 @@ public:
|
||||
std::string TargetPDB;
|
||||
std::string TargetCompilePDB;
|
||||
std::string ObjectDir;
|
||||
std::string TargetSupportDir;
|
||||
std::string ObjectFileDir;
|
||||
std::string DependencyFile;
|
||||
std::string DependencyTarget;
|
||||
|
||||
@@ -77,6 +77,11 @@ std::string cmRulePlaceholderExpander::ExpandVariable(
|
||||
return this->ReplaceValues->Object;
|
||||
}
|
||||
}
|
||||
if (this->ReplaceValues->TargetSupportDir) {
|
||||
if (variable == "TARGET_SUPPORT_DIR") {
|
||||
return this->ReplaceValues->TargetSupportDir;
|
||||
}
|
||||
}
|
||||
if (this->ReplaceValues->ObjectDir) {
|
||||
if (variable == "OBJECT_DIR") {
|
||||
return this->ReplaceValues->ObjectDir;
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
char const* DynDepFile = nullptr;
|
||||
char const* Output = nullptr;
|
||||
char const* Object = nullptr;
|
||||
char const* TargetSupportDir = nullptr;
|
||||
char const* ObjectDir = nullptr;
|
||||
char const* ObjectFileDir = nullptr;
|
||||
char const* Flags = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user