[CMake] incremental build slow because of F90 (cmake_copy_f90_mod)

Brad King brad.king at kitware.com
Tue Jul 13 09:11:23 EDT 2010


On 07/13/2010 07:34 AM, Verweij, Arjen wrote:
> Sent Brad source code to reproduce the bahaviour.
[snip]
> I have figured out that the time spent is not lost in
> cmake_copy_f90_mod, but in a make directive right before:
>
> /usr1/people/maddev/util/bin/make -f CMakeFiles/mytest.dir/build.make CMakeFiles/mytest.dir/exec.f90.o.provides.build
>
> So the make is slow, but the cmake_copy_f90_mod and the touch are fast.

The example is very zippy for me, but I had to change to using a
different compiler because I do not have pgf90 installed.  I tried
both GNU on Linux and XL on AIX.  I wonder if cmake_copy_f90_mod
has trouble with the pgf90 module files.  We do have tests running
nightly for that platform, but they would not reveal a delay if
the result is correct.

The log you sent is inconclusive.  I do not think the lines are
appearing in the order they are produced.  The make invocation
you mention above *is* executing cmake_copy_f90_mod.

After running the initial make to build the first time, edit the
file "CMakeFiles/mytest.dir/depend.make".  There should be a block
like this:

CMakeFiles/mytest.dir/execute.mod.proxy: CMakeFiles/mytest.dir/exec.f90.o.provides
CMakeFiles/mytest.dir/exec.f90.o.provides.build:
        $(CMAKE_COMMAND) -E cmake_copy_f90_mod inc/mod/execute CMakeFiles/mytest.dir/execute.mod.stamp GNU
        $(CMAKE_COMMAND) -E touch CMakeFiles/mytest.dir/exec.f90.o.provides.build
CMakeFiles/mytest.dir/build: CMakeFiles/mytest.dir/exec.f90.o.provides.build

Add an "echo" before and after the cmake_copy_f90_mod line to
confirm whether the delay is there or not.

Thanks,
-Brad


More information about the CMake mailing list