diff options
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index e2816ee..c1ea454 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -19,11 +19,17 @@ // cmTargetLinkLibrariesCommand bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& argsIn) { - if(argsIn.size() < 2) + // must have one argument + if(argsIn.size() < 1) { this->SetError("called with incorrect number of arguments"); return false; } + // but we might not have any libs after variable expansion + if(argsIn.size() < 2) + { + return true; + } std::vector<std::string> args; cmSystemTools::ExpandListArguments(argsIn, args); // add libraries, nothe that there is an optional prefix |