diff options
Diffstat (limited to 'Source/cmLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmLinkLibrariesCommand.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 56d4937..c34cd3c 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -31,12 +31,22 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args) if (*i == "debug") { ++i; + if(i == args.end()) + { + this->SetError("The \"debug\" argument must be followed by a library"); + return false; + } m_Makefile->AddLinkLibrary(i->c_str(), cmTarget::DEBUG); } else if (*i == "optimized") { ++i; + if(i == args.end()) + { + this->SetError("The \"optimized\" argument must be followed by a library"); + return false; + } m_Makefile->AddLinkLibrary(i->c_str(), cmTarget::OPTIMIZED); } |