summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 128291d..0998eb8 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -676,7 +676,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
i != archiveFinishCommands.end(); ++i) {
std::string cmd = *i;
this->LocalGenerator->ExpandRuleVariables(cmd, vars);
- real_link_commands.push_back(cmd);
+ // If there is no ranlib the command will be ":". Skip it.
+ if (!cmd.empty() && cmd[0] != ':') {
+ real_link_commands.push_back(cmd);
+ }
}
} else {
// Get the set of commands.