summaryrefslogtreecommitdiffstats
path: root/Source/cmFortranParserImpl.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-04-05 16:57:15 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-05 16:59:45 (GMT)
commitf831d752aeb3000a9b1b686da986af7ffecb6968 (patch)
tree360e3133eabf3debc6662579cd4251ad649098db /Source/cmFortranParserImpl.cxx
parent64130a7e793483e24c1d68bdd234f81d5edb2d51 (diff)
downloadCMake-f831d752aeb3000a9b1b686da986af7ffecb6968.zip
CMake-f831d752aeb3000a9b1b686da986af7ffecb6968.tar.gz
CMake-f831d752aeb3000a9b1b686da986af7ffecb6968.tar.bz2
cmFortranParser: Skip #line directives that do not name files
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.
Diffstat (limited to 'Source/cmFortranParserImpl.cxx')
-rw-r--r--Source/cmFortranParserImpl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx
index c175e62..b3b2f16 100644
--- a/Source/cmFortranParserImpl.cxx
+++ b/Source/cmFortranParserImpl.cxx
@@ -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);
}