<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<pre>>> but I have found that this person:
>><i> <a href="http://www.cmake.org/pipermail/cmake/2010-November/040832.html">http://www.cmake.org/pipermail/cmake/2010-November/040832.html</a>
</i>>><i> had a very similar problem.
</i>
> This one?
<a href="http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/32850/focus=32893">> http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/32850/focus=32893</a>
Yes.
That person also had an issue with one Fortran 90 file using a module built by another Fortran 90
file in the same target and directory, and had the same error message from gnumake as I did.
His solution was to manually add a dependency since in his case it appeared CMake missed it?
But I have about a hundred instances of this same-target/directory module dependence.
Also, I think some rpm installed in the background without my knowing it, so I restarted Firefox
and now I can view your examples of:
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Library/CMakeLists.txt;hb=v2.8.7">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Library/CMakeLists.txt;hb=v2.8.7</a>
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Library/a.f90;hb=v2.8.7">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Library/a.f90;hb=v2.8.7</a>
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Library/b.f90;hb=v2.8.7">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Library/b.f90;hb=v2.8.7</a>
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Executable/CMakeLists.txt;hb=v2.8.7">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Executable/CMakeLists.txt;hb=v2.8.7</a>
<a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Executable/main.f90;hb=v2.8.7">http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Fortran/Executable/main.f90;hb=v2.8.7</a>
Something that confuses me is:
1 INCLUDE_DIRECTORIES(${Library_MODDIR})
7 IF(CMAKE_Fortran_MODDIR_FLAG)
8 SET_TARGET_PROPERTIES(subdir_mods PROPERTIES
9 Fortran_MODULE_DIRECTORY modules
10 )
11 ENDIF(CMAKE_Fortran_MODDIR_FLAG)
If a hardcoded directory "modules" is being specified as the output directory for modules built from
a.f90 and b.f90 when the compiler supports a module output flag, why isn't "modules" in the include
directories so that a.f90 can find B.mod? Or is "${Library_MODDIR}" an intrinsic CMake function which
is assigned the local target's module output directory?
>><i> The problem is I need a Fortran 90 file to be built using a module from another Fortran 90 file in the same
</i>>><i> directory and target, and I need this often.
</i>
> This is expected to work. If one Fortran 90 source file in
> a single target provides a module and another one uses it then
> CMake will detect this and add the proper make dependencies to
> build them in the right order (and rebuild).
> -Brad
But this is not working for me. I still have the error:
*** No rule to make target `dir/CMakeFiles/target.a.dir/foo2.mod.stamp',
needed by `dir/foo.tmp.f'. Stop.
for add_library(target foo.f90 foo2.f90), where foo.f90 has "USE foo."
This may be a similar issue as my Ada modules having the erroneous requires step which
caused a red herring error to show up which you caught in January (vis a vis something other
than dependency checking is causing the error). So why would a make rule for
*.mod.stamp not be generated?
</pre>
</body>
</html>