summaryrefslogtreecommitdiffstats
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddExecutableCommand.cxx')
-rw-r--r--Source/cmAddExecutableCommand.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index 0bc2a7a..f70e790 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -49,6 +49,12 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
}
}
+ if (s == args.end())
+ {
+ this->SetError("called with incorrect number of arguments, no sources provided");
+ return false;
+ }
+
std::vector<std::string> srclists(s, args.end());
cmTarget* tgt = m_Makefile->AddExecutable(exename.c_str(), srclists);
if ( use_win32 )