diff options
author | Brad King <brad.king@kitware.com> | 2016-09-05 18:50:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-06 19:40:04 (GMT) |
commit | e11cd31fa0cce8210577ee46b6a33ee371f4fe64 (patch) | |
tree | 8df65973c382e58798981622fc6c4550d93409d2 /Source/cmDependsFortran.cxx | |
parent | 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (diff) | |
download | CMake-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/cmDependsFortran.cxx')
-rw-r--r-- | Source/cmDependsFortran.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 1eece98..b7e006d 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -130,6 +130,12 @@ bool cmDependsFortran::WriteDependencies(const std::set<std::string>& sources, if (cmFortran_yyparse(parser.Scanner) != 0) { // Failed to parse the file. Report failure to write dependencies. okay = false; + /* clang-format off */ + std::cerr << + "warning: failed to parse dependencies from Fortran source " + "'" << src << "': " << parser.Error << std::endl + ; + /* clang-format on */ } } return okay; |