Thanks Karl, that got me looking in the right direction:

Changing the line

<fixed_fmt>^[cC*dD].*\n { return EOSTMT; }

to:

^[cC*dD].*\n { return EOSTMT; }

in cmDependsFortranLexer.in.y fixes the problem.  This forces the parser to 
ignore comment lines.

I also discovered that include paths are not searched properly when the 
dependecies are written out .  I set my include paths in the CMakeLists.txt as 
follows:

INCLUDE_DIRECTORIES(
        include/
)

Included files under the "include/" directory are not written out to 
depend.make.  I have traced the problem part way down.  It appears that when 
cmLocalUnixMakefileGenerator3.cxx constructs the cmFortranDepends object that 
the includes path vector is empty.  The code loops through each language, the 
paths gets set for C++ but not for Fortran.  The code is looking for the 
CMAKE_Fortran_INCLUDES to contain the paths, but the variable is empty.   
Anybody have any ideas for a quick fix?

Thanks,

Bryan Walsh



---- Karl Merkley <[EMAIL PROTECTED]> wrote: 
> 
> What I found with the module problem was that the parser was picking  
> up the keyword in the comment.  I just did something like add braces  
> around the module keyword so that the parser was a little more  
> confused and didn't identify the word module in the comment.   
> Something like . . .
> 
> c   this is a {module} in fortran
> 
> After that it worked great including the dependencies.  The fix is to  
> modify the parser so that any line that has  a "c" (case independent)  
> in the first line is skipped.  Unfortunately, my flex/bison skills  
> are non-existent so I wouldn't have a clue as to how to make that  
> change!
> 
>     Karl

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to