Skip to content

Commit

Permalink
cmFortranParser: Skip #line directives that do not name files
Browse files Browse the repository at this point in the history
Since commit v3.5.0-rc1~241^2~1 (cmFortranParser: Parse #line
directives, 2015-11-02) our Fortran dependency scanner parses `#line`
directives to extract the named files.  However, some compilers produce
`#line` directives that name directories instead of files.  Work around
such cases by verifying that the extracted path names a file and not a
directory.
  • Loading branch information
bradking committed Apr 5, 2016
1 parent 64130a7 commit f831d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/cmFortranParserImpl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void cmFortranParser_RuleLineDirective(cmFortranParser* parser,
cmSystemTools::ConvertToUnixSlashes(included);

// Save the named file as included in the source.
if (cmSystemTools::FileExists(included))
if (cmSystemTools::FileExists(included, true))
{
parser->Info.Includes.insert(included);
}
Expand Down

0 comments on commit f831d75

Please sign in to comment.