cmLocalGenerator: Add format option to ConvertToLinkReference
Replace the hard-coded SHELL output format with an optional argument.
This commit is contained in:
parent
0c0ef9e7b7
commit
971653b767
@ -1759,7 +1759,8 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib)
|
std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib,
|
||||||
|
OutputFormat format)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
// Work-ardound command line parsing limitations in MSVC 6.0 and
|
// Work-ardound command line parsing limitations in MSVC 6.0 and
|
||||||
@ -1781,14 +1782,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib)
|
|||||||
sp += lib.substr(pos);
|
sp += lib.substr(pos);
|
||||||
|
|
||||||
// Convert to an output path.
|
// Convert to an output path.
|
||||||
return this->Convert(sp.c_str(), NONE, SHELL);
|
return this->Convert(sp.c_str(), NONE, format);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Normal behavior.
|
// Normal behavior.
|
||||||
return this->Convert(lib.c_str(), START_OUTPUT, SHELL);
|
return this->Convert(lib.c_str(), START_OUTPUT, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -415,7 +415,8 @@ protected:
|
|||||||
std::string FindRelativePathTopBinary();
|
std::string FindRelativePathTopBinary();
|
||||||
void SetupPathConversions();
|
void SetupPathConversions();
|
||||||
|
|
||||||
virtual std::string ConvertToLinkReference(std::string const& lib);
|
virtual std::string ConvertToLinkReference(std::string const& lib,
|
||||||
|
OutputFormat format = SHELL);
|
||||||
|
|
||||||
/** Check whether the native build system supports the given
|
/** Check whether the native build system supports the given
|
||||||
definition. Issues a warning. */
|
definition. Issues a warning. */
|
||||||
|
@ -143,9 +143,10 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator()
|
|||||||
// Virtual protected methods.
|
// Virtual protected methods.
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib)
|
cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib,
|
||||||
|
OutputFormat format)
|
||||||
{
|
{
|
||||||
return this->Convert(lib.c_str(), HOME_OUTPUT, SHELL);
|
return this->Convert(lib.c_str(), HOME_OUTPUT, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
|
@ -97,7 +97,8 @@ public:
|
|||||||
void AppendCustomCommandDeps(const cmCustomCommand *cc,
|
void AppendCustomCommandDeps(const cmCustomCommand *cc,
|
||||||
cmNinjaDeps &ninjaDeps);
|
cmNinjaDeps &ninjaDeps);
|
||||||
|
|
||||||
virtual std::string ConvertToLinkReference(std::string const& lib);
|
virtual std::string ConvertToLinkReference(std::string const& lib,
|
||||||
|
OutputFormat format = SHELL);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user