[CMake] Cmake 3.5.0 and Fortran submodule cannot be built

olusegun ogunbade pogos77 at hotmail.com
Thu Mar 24 15:29:18 EDT 2016


Hi All

Please find attached a tar file containing the source code. The build process and encountered error are:

ogunbog at JesusIsLord:~/work/fortran/point/build$ cmake .. 
-- The Fortran compiler identification is GNU 6.0.0 
-- Check for working Fortran compiler: /home/ogunbog/bin/gfc6u4 
-- Check for working Fortran compiler: /home/ogunbog/bin/gfc6u4  -- works 
-- Detecting Fortran compiler ABI info 
-- Detecting Fortran compiler ABI info - done 
-- Checking whether /home/ogunbog/bin/gfc6u4 supports Fortran 90 
-- Checking whether /home/ogunbog/bin/gfc6u4 supports Fortran 90 -- yes 
-- Configuring done 
-- Generating done 
-- Build files have been written to: /home/ogunbog/work/fortran/point/build 
ogunbog at JesusIsLord:~/work/fortran/point/build$ l 
CMakeCache.txt  CMakeFiles/  cmake_install.cmake  Makefile  mod/  src/ 
ogunbog at JesusIsLord:~/work/fortran/point/build$ l mod/ 
ogunbog at JesusIsLord:~/work/fortran/point/build$ make 
Scanning dependencies of target foo 
[ 33%] Building Fortran object src/CMakeFiles/foo.dir/m_point.f90.o 
Error copying Fortran module "mod/procedure".  Tried "mod/PROCEDURE.mod" and "mod/procedure.mod". 
make[2]: *** [src/CMakeFiles/foo.dir/m_point.f90.o.provides.build] Error 1 
make[1]: *** [src/CMakeFiles/foo.dir/all] Error 2 
make: *** [all] Error 2 
ogunbog at JesusIsLord:~/work/fortran/point/build$ l mod/ 
m_point.mod  m_point at point_a.smod  m_point.smod 



A major benefit of submodules is that if a change is made to one, only it and its descendants are affected. Thus, it avoid unnecessary recompilation cascades.

Regards
Prince

===========================================================
Prince Olusegun G. Ogunbade
School Address                                                  Postal Address
Dept. of Physics                                                     P O Box 11646
University of Pretoria                                             The Tramshed
Pretoria 0002                                                        Pretoria 0126
Republic of South Africa                                         Republic of South Africa

Telephone:
========
+27 (0)12 420 3114 (School)
+27 (0)74 539 7920 (Mobile)

E-mail:
====
pogos77 at hotmail.com
pogos77 at tuks.co.za
jilfa12 at yahoo.com

________________________________________
From: Brad King <brad.king at kitware.com>
Sent: Wednesday, March 23, 2016 10:12 PM
To: olusegun ogunbade
Cc: Arjen Markus; cmake at cmake.org
Subject: Re: [CMake] Cmake 3.5.0 and Fortran submodule cannot be built

On 03/23/2016 11:41 AM, Arjen Markus wrote:
> Fortran submodules are contained in a file with the extension
> .smod instead of .mod. At least for Intel Fortran. It may very
> well be that this feature is not yet supported by CMake.
[snip]
>> Error copying Fortran module "mod/function".
>> Tried "mod/FUNCTION.mod" and "mod/function.mod".
>>
>> Does recent cmake support Fortran submodule?

CMake has not been taught about Fortran submodules.  I'm not
very familiar with them either.

Do submodules affect the order in which sources need to be
compiled as modules do?

Please provide a small example project demonstrating use of
submodules and showing the error above.

Thanks,
-Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: point.tar
Type: application/x-tar
Size: 24451 bytes
Desc: point.tar
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160324/2043da2a/attachment-0001.tar>


More information about the CMake mailing list