mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
ENH: better error checking for add library or executable with no source files
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user