MantisBT - CMake
View Issue Details
0014215CMakeCMakepublic2013-06-13 19:182016-06-10 14:31
irwin 
Kitware Robot 
normalfeaturealways
closedmoved 
x86_64 GNU/LinuxLinuxDebian wheezy
CMake 2.8.10.2 
 
0014215: The "Ninja" generator does not support Fortran
A simple Fortran project with

project(test_fortran Fortran)

in the CMakeLists.txt file produces the following error message for the "Ninja" generator

CMake Error: The "Ninja" generator does not support the language "Fortran" yet.
-- The Fortran compiler identification is GNU
-- Check for working Fortran compiler using: Ninja
CMake Error: The "Ninja" generator does not support the language "Fortran" yet.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working Fortran compiler using: Ninja -- broken
CMake Error at /home/software/cmake/install-2.8.10.2/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler "/usr/bin/f95" is not able to compile a simple test
  program.

  It fails with the following output:

   

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


-- Configuring incomplete, errors occurred!


Any CMake project that enables Fortran that I have tried on Linux generates this error with the "Ninja" generator. But I doubt very much this error is limited just to the Linux platform.
This error is largely a "Ninja" generator showstopper for me since many of the software projects I build (such as PLplot) do enable the Fortran language.
No tags attached.
Issue History
2013-06-13 19:18irwinNew Issue
2013-06-14 08:03Brad KingNote Added: 0033285
2013-06-14 08:03Brad KingSeverityblock => feature
2013-06-14 08:03Brad KingStatusnew => backlog
2014-03-24 18:24Ben BoeckelNote Added: 0035499
2015-07-01 18:11Stephen McCrackenNote Added: 0039010
2016-06-10 14:29Kitware RobotNote Added: 0042299
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0033285)
Brad King   
2013-06-14 08:03   
For reference, the corresponding mailing list discussion is here:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7150/focus=7151 [^]
(0035499)
Ben Boeckel   
2014-03-24 18:24   
This may be doable with gfortran 4.6+ having the GCC -M* flags. Is there some other logic needed other than "a.f's a.o depends on b.f because a.f imports it" (i.e., does a.f rely on b.o or b.f)?
(0039010)
Stephen McCracken   
2015-07-01 18:11   
Would it be possible to support a mixed Ninja/Make solution, where Make builds the Fortran targets and Ninja builds the C/C++ targets? That might work well for the common case where a C++ application calls out to legacy Fortran libraries that almost never change.
(0042299)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.