diff options
author | Brad King <brad.king@kitware.com> | 2016-09-05 17:35:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-20 13:08:28 (GMT) |
commit | bdcc1f517ed8a513f8c156d83f0244c1b9e98703 (patch) | |
tree | ce38cdaeadbf1c647bbee7aa208754c597e3bdca /Source/cmFortranParser.y | |
parent | 6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b (diff) | |
download | CMake-bdcc1f517ed8a513f8c156d83f0244c1b9e98703.zip CMake-bdcc1f517ed8a513f8c156d83f0244c1b9e98703.tar.gz CMake-bdcc1f517ed8a513f8c156d83f0244c1b9e98703.tar.bz2 |
cmFortranParser: Skip module procedures/functions/subroutines
Fortran allows the syntax
MODULE PROCEDURE ...
MODULE FUNCTION ...
MODULE SUBROUTINE ...
to declare procedures/functions/subroutines that are members of modules.
Do not treat such syntax as the definition of a module with one of these
names.
Issue: #16234
Diffstat (limited to 'Source/cmFortranParser.y')
-rw-r--r-- | Source/cmFortranParser.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y index b856a1a..7cf7619 100644 --- a/Source/cmFortranParser.y +++ b/Source/cmFortranParser.y @@ -113,7 +113,11 @@ stmt: } | MODULE WORD other EOSTMT { cmFortranParser* parser = cmFortran_yyget_extra(yyscanner); - cmFortranParser_RuleModule(parser, $2); + if (cmsysString_strcasecmp($2, "function") != 0 && + cmsysString_strcasecmp($2, "procedure") != 0 && + cmsysString_strcasecmp($2, "subroutine") != 0) { + cmFortranParser_RuleModule(parser, $2); + } free($2); } | INTERFACE WORD other EOSTMT { |