MantisBT - CMake
View Issue Details
0003195CMakeCMakepublic2006-05-03 13:532007-10-03 15:48
leith 
Brad King 
lowmajoralways
closedduplicate 
 
 
0003195: depend.make has incorrect f90 dependencies for USE
Am trying to use CMake Version 2.2 - patch 3 to build a Fortran 90 project.

Using: CMakeLists.txt (simplified)

PROJECT (spider Fortran )
ADD_LIBRARY(spider STATIC filename.f latcen.f ...................)

Upon running 'make' I get following error:

Scanning dependencies of target spider
CMakeFiles/spider.dir/depend.make:136: *** target pattern contains no `%'. Stop.

depend.make contains many lines which appear to be dependencies which
are incorrect: e.g. line 136

CMakeFiles/spider.dir/latcen.o.requires: LATCEN:.mod.proxy

But the string LATCEN is only present inside a FORTRAN comment
C TO USE LATCEN: FIRST CALL LATCEN(IERR,0,,,,,,,,,,,)

Cmake is creating a dependency wherever it finds the string 'USE',
even inside a FORTRAN comment line.
No tags attached.
duplicate of 0003109closed Brad King Fortran dependancy checker does not ignore comments 
related to 0005809closed Brad King Fortran 77/9x support enhancements 
Issue History
2007-10-03 15:47Brad KingRelationship addedduplicate of 0003109
2007-10-03 15:48Brad KingRelationship addedrelated to 0005809

Notes
(0004054)
Brad King   
2006-05-03 18:28   
I'm closing this bug as a duplicate of bug 0003109.
(0004055)
Brad King   
2006-05-03 19:43   
The bug is in "Source/cmDependsFortranLexer.in.l" or a related file. Nothing ever tells the lexer whether it is parsing a free for fixed format source. Currently free format is assumed always.

It looks like there is a new version of makedepf90 from which the parser was derived (with permission from the author to use a non-GPL license). The newer version has better support for switching between fixed and free format. The parser in CMake should probably be updated when this bug is fixed.