Merge topic 'fix-empty-link-line-crash'

8ff1d47 CMake: Skip empty link.txt lines (#13845)
This commit is contained in:
Brad King 2013-01-15 14:34:20 -05:00 committed by CMake Topic Stage
commit d870867570
1 changed files with 6 additions and 0 deletions

View File

@ -3299,6 +3299,12 @@ int cmake::ExecuteLinkScript(std::vector<std::string>& args)
int result = 0;
while(result == 0 && cmSystemTools::GetLineFromStream(fin, command))
{
// Skip empty command lines.
if(command.find_first_not_of(" \t") == command.npos)
{
continue;
}
// Setup this command line.
const char* cmd[2] = {command.c_str(), 0};
cmsysProcess_SetCommand(cp, cmd);