MantisBT - CMake
View Issue Details
0006930CMakeCMakepublic2008-05-01 09:332008-05-01 09:49
Christian Convey 
 
normalmajoralways
closedfixed 
CMake-2-6 
CMake-2-6 
0006930: (2.4-8) Fortran comments the text 'use' cause false dependency
Apparently "use" is a keyword in some version(s) of fortran. I'm using F77 code, but I suspect this is a bug for all versions of fortran:

I've created a trivial test case with one fortran file and one cmakelists.txt file:

foo.f has these 3 lines:
       SUBROUTINE FOO( X )
C USE BLAH.
       END


CMakeLists.txt has these 3 lines:
PROJECT(CASS_BISTATIC Fortran)
FILE(GLOB SRC foo.f)
bistatic STATIC ${SRC})

Running 'cmake' has no problem. But when I then run 'make', I get this output:

cjc@cjc-aleph:~/cppcass/trunk/cass-4.1-fortran/bistatic$ make
Scanning dependencies of target cass_bistatic
make[2]: *** No rule to make target `BLAH..mod.proxy', needed by `CMakeFiles/cass_bistatic.dir/foo.o.requires'. Stop.
make[1]: *** [CMakeFiles/cass_bistatic.dir/all] Error 2
make: *** [all] Error 2
No tags attached.
txt CMakeLists.txt (95) 2008-05-01 09:33
https://public.kitware.com/Bug/file/1435/CMakeLists.txt
? foo.f (59) 2008-05-01 09:34
https://public.kitware.com/Bug/file/1436/foo.f
? CMakeLists.txt-corrected (94) 2008-05-01 09:37
https://public.kitware.com/Bug/file/1437/CMakeLists.txt-corrected
Issue History
2008-05-01 09:33Christian ConveyNew Issue
2008-05-01 09:33Christian ConveyFile Added: CMakeLists.txt
2008-05-01 09:34Christian ConveyFile Added: foo.f
2008-05-01 09:36Christian ConveyNote Added: 0011642
2008-05-01 09:37Christian ConveyFile Added: CMakeLists.txt-corrected
2008-05-01 09:49Bill HoffmanStatusnew => closed
2008-05-01 09:49Bill HoffmanNote Added: 0011643
2008-05-01 09:49Bill HoffmanResolutionopen => fixed
2008-05-01 09:49Bill HoffmanFixed in Version => CMake-2-6

Notes
(0011642)
Christian Convey   
2008-05-01 09:36   
I accidentally provided a wrong version of the CMakeLists.txt file. I'm attaching the correct version. It's content is this:

PROJECT(CASS_BISTATIC Fortran)
FILE(GLOB SRC foo.f)

ADD_LIBRARY(cass_bistatic STATIC ${SRC})
(0011643)
Bill Hoffman   
2008-05-01 09:49   
This is fixed in CMake 2.6