summaryrefslogtreecommitdiff
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-07-19 14:40:49 -0400
committerKen Martin <ken.martin@kitware.com>2002-07-19 14:40:49 -0400
commit6bbc8e9d4592c503f7c9b174c86610c9307e337a (patch)
tree26d2a0a69d39fd487102325d7b9bf3f4dc30875b /Source/cmTargetLinkLibrariesCommand.cxx
parentc8ed9d7452a5990e8dcfe566c508bfb85b7baf2d (diff)
downloadcmake-6bbc8e9d4592c503f7c9b174c86610c9307e337a.tar.gz
does not need a second argument
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index e2816ee156..c1ea454ee9 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