mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
cmGeneratorTarget: Add helper to check for known runtime artifact
This commit is contained in:
@@ -1258,6 +1258,19 @@ bool cmGeneratorTarget::CanCompileSources() const
|
|||||||
return this->Target->CanCompileSources();
|
return this->Target->CanCompileSources();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmGeneratorTarget::HasKnownRuntimeArtifactLocation(
|
||||||
|
std::string const& config) const
|
||||||
|
{
|
||||||
|
if (!this->IsRuntimeBinary()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this->IsImported()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
ImportInfo const* info = this->GetImportInfo(config);
|
||||||
|
return info && !info->Location.empty();
|
||||||
|
}
|
||||||
|
|
||||||
const std::string& cmGeneratorTarget::GetLocationForBuild() const
|
const std::string& cmGeneratorTarget::GetLocationForBuild() const
|
||||||
{
|
{
|
||||||
static std::string location;
|
static std::string location;
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public:
|
|||||||
bool IsImported() const;
|
bool IsImported() const;
|
||||||
bool IsImportedGloballyVisible() const;
|
bool IsImportedGloballyVisible() const;
|
||||||
bool CanCompileSources() const;
|
bool CanCompileSources() const;
|
||||||
|
bool HasKnownRuntimeArtifactLocation(std::string const& config) const;
|
||||||
const std::string& GetLocation(const std::string& config) const;
|
const std::string& GetLocation(const std::string& config) const;
|
||||||
|
|
||||||
/** Get the full path to the target's main artifact, if known. */
|
/** Get the full path to the target's main artifact, if known. */
|
||||||
|
|||||||
Reference in New Issue
Block a user