summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-01-04 21:03:41 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-01-04 21:03:41 (GMT)
commita2262a83943db446e1ae36df8359ae118a28b577 (patch)
treeed2c02bbb64ffecd9baea8f2a9c8fac8407bd776 /Source/cmAddLibraryCommand.cxx
parent2861c056bcde60b6efbce7a91dd2f7149d790570 (diff)
downloadCMake-a2262a83943db446e1ae36df8359ae118a28b577.zip
CMake-a2262a83943db446e1ae36df8359ae118a28b577.tar.gz
CMake-a2262a83943db446e1ae36df8359ae118a28b577.tar.bz2
BUG: fix for bad argument handling
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index ac7fc90..6084e3a 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -38,8 +38,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
// If the second argument is "SHARED" or "STATIC", then it controls
// the type of library. Otherwise, it is treated as a source or
- // source list name.
- if(s != args.end())
+ // source list name. There man be two keyword arguments, check for them
+ while ( s != args.end() )
{
std::string libType = *s;
if(libType == "STATIC")
@@ -62,6 +62,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
++s;
in_all = false;
}
+ else
+ {
+ break;
+ }
}
if (s == args.end())