mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator
This commit is contained in:
@@ -97,6 +97,18 @@ const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmCustomCommandGenerator::HasOnlyEmptyCommandLines() const
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < this->CommandLines.size(); ++i) {
|
||||||
|
for (size_t j = 0; j < this->CommandLines[i].size(); ++j) {
|
||||||
|
if (!this->CommandLines[i][j].empty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
|
std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
|
||||||
{
|
{
|
||||||
if (const char* emulator = this->GetCrossCompilingEmulator(c)) {
|
if (const char* emulator = this->GetCrossCompilingEmulator(c)) {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public:
|
|||||||
std::vector<std::string> const& GetOutputs() const;
|
std::vector<std::string> const& GetOutputs() const;
|
||||||
std::vector<std::string> const& GetByproducts() const;
|
std::vector<std::string> const& GetByproducts() const;
|
||||||
std::vector<std::string> const& GetDepends() const;
|
std::vector<std::string> const& GetDepends() const;
|
||||||
|
bool HasOnlyEmptyCommandLines() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user