summaryrefslogtreecommitdiffstats
path: root/Source/cmFortranParserImpl.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-05 18:50:31 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-06 19:40:04 (GMT)
commite11cd31fa0cce8210577ee46b6a33ee371f4fe64 (patch)
tree8df65973c382e58798981622fc6c4550d93409d2 /Source/cmFortranParserImpl.cxx
parent8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (diff)
downloadCMake-e11cd31fa0cce8210577ee46b6a33ee371f4fe64.zip
CMake-e11cd31fa0cce8210577ee46b6a33ee371f4fe64.tar.gz
CMake-e11cd31fa0cce8210577ee46b6a33ee371f4fe64.tar.bz2
Fortran: Warn when dependency scanning fails to parse a source file
We expect to handle all relevant statements and ignore those that we do not understand. Warn if this process ever fails. Otherwise dependency information may be silently left out.
Diffstat (limited to 'Source/cmFortranParserImpl.cxx')
-rw-r--r--Source/cmFortranParserImpl.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx
index 71edf9f..d43d47c 100644
--- a/Source/cmFortranParserImpl.cxx
+++ b/Source/cmFortranParserImpl.cxx
@@ -164,11 +164,9 @@ int cmFortranParser_GetOldStartcond(cmFortranParser* parser)
return parser->OldStartcond;
}
-void cmFortranParser_Error(cmFortranParser* /*unused*/, const char* /*unused*/)
+void cmFortranParser_Error(cmFortranParser* parser, const char* msg)
{
- // If there is a parser error just ignore it. The source will not
- // compile and the user will edit it. Then dependencies will have
- // to be regenerated anyway.
+ parser->Error = msg ? msg : "unknown error";
}
void cmFortranParser_RuleUse(cmFortranParser* parser, const char* name)