diff options
author | Michael Stürmer <michael.stuermer@schaeffler.com> | 2017-08-30 13:30:32 (GMT) |
---|---|---|
committer | Michael Stürmer <michael.stuermer@schaeffler.com> | 2017-09-04 09:41:45 (GMT) |
commit | 34c4108bbcb8774821ac857e0ad0a92294ee8b0b (patch) | |
tree | 031024e2aedfe71d180a405a5d61974ff4923352 /Source/cmCustomCommandGenerator.cxx | |
parent | 8d13e9c1f5fa7871153ef83aa67d67e72fcaa5c1 (diff) | |
download | CMake-34c4108bbcb8774821ac857e0ad0a92294ee8b0b.zip CMake-34c4108bbcb8774821ac857e0ad0a92294ee8b0b.tar.gz CMake-34c4108bbcb8774821ac857e0ad0a92294ee8b0b.tar.bz2 |
add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator
Diffstat (limited to 'Source/cmCustomCommandGenerator.cxx')
-rw-r--r-- | Source/cmCustomCommandGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index fdc0a97..c6a2800 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -97,6 +97,18 @@ const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const 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 { if (const char* emulator = this->GetCrossCompilingEmulator(c)) { |