diff options
author | Brad King <brad.king@kitware.com> | 2012-05-22 18:07:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-05-22 18:07:24 (GMT) |
commit | ad2107903a28e8e41b3170ee6089f7c080c49614 (patch) | |
tree | 27679f4929b4034f2b9eb75b42e46bd11d87c123 /Source/cmDependsFortranLexer.in.l | |
parent | f2656e4ccb7b05cb1bef17ccf61dc9af7ed3f5fc (diff) | |
download | CMake-ad2107903a28e8e41b3170ee6089f7c080c49614.zip CMake-ad2107903a28e8e41b3170ee6089f7c080c49614.tar.gz CMake-ad2107903a28e8e41b3170ee6089f7c080c49614.tar.bz2 |
Fortran: Follow <>-style includes (#13239)
Fortran sources that pass through the C preprocessor may use
#include "header"
syntax or
#include <header>
syntax. CMake already follows the former. Teach it to follow the
latter.
Diffstat (limited to 'Source/cmDependsFortranLexer.in.l')
-rw-r--r-- | Source/cmDependsFortranLexer.in.l | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmDependsFortranLexer.in.l b/Source/cmDependsFortranLexer.in.l index af8e37d..40e80b7 100644 --- a/Source/cmDependsFortranLexer.in.l +++ b/Source/cmDependsFortranLexer.in.l @@ -115,6 +115,11 @@ Modify cmDependsFortranLexer.h: !.*\n { return EOSTMT; } /* Treat comments like */ <fixed_fmt>^[cC*dD].*\n { return EOSTMT; } /* empty lines */ +^[ \t]*#[ \t]*include[ \t]*<[^>]+> { + yytext[yyleng-1] = 0; + yylvalp->string = strdup(strchr(yytext, '<')+1); + return CPP_INCLUDE_ANGLE; +} ^[ \t]*#[ \t]*include { return CPP_INCLUDE; } \$[ \t]*include { return F90PPR_INCLUDE; } \?\?[ \t]*include { return COCO_INCLUDE; } |