3 Aug 2012 00:03
Problem with FortranCInterface_VERIFY and the Nag Fortran Compiler
I've run into a problem using the FortranCInterface_VERIFY macro with
the Nag Fortran compiler. If the Fortran compiler flags contain the
'-g90' option, it fails because Nag tries to write a debug file (*.g90)
to the same directory as the source Fortran file. In most cases, a user
does not have write permission in the CMake installation location and
the compile fails. I can not control where Nag writes these debug files.
Suggestions on how to work around this other than skipping this test if
using Nag with the '-g90' option?
Example CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8)
project(Foo C Fortran)
include(FortranCInterface)
FortranCInterface_VERIFY()
Error Output:
Building Fortran object CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
<redacted>/nag/5.2.724/bin/nagfor -g90
-I<redacted>/foo/CMakeFiles/FortranCInterface/VerifyC -c
/opt/packages/cmake/2.8.8/share/cmake-2.8/Modules/FortranCInterface/Verify/VerifyFortran.f
-o CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
NAG Fortran Compiler Release 5.2(724)
Obsolescent:
/opt/packages/cmake/2.8.8/share/cmake-2.8/Modules/FortranCInterface/Verify/VerifyFortran.f,
(Continue reading)
RSS Feed