|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008345||CMake||CMake||public||2009-01-05 09:54||2015-07-08 08:57|
|Target Version||Fixed in Version|
|Summary||0008345: enable_language(fortran optional) fails if no fortran compiler is installed|
|Description||"enable_language(fortran optional)" on Debian without an installed fortran compiler results in|
-- The Fortran compiler identification is unknown
CMake Error at /usr/share/cmake-2.6/Modules/CMakeFortranInformation.cmake:6 (GET_FILENAME_COMPONENT):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
and a terminated configure step.
|Tags||No tags attached.|
|Oh, and if i remember correctly this also also happens in Windows with the MSVC project generators.|
Greg Sharp (reporter)
edited on: 2009-08-22 23:11
I have created a workaround for this problem. It is attached to ticket 0009220 as language_support_v2.cmake
Here is a cmake file which reproduces the problem:
Note: you have to run cmake twice to reproduce the problem. After you run the first time, CMAKE_Fortran_COMPILER is added to the CMakeCache with NULL value (no fortran compiler installed), which triggers the exception.
|Like issue 0009220, this problem is not specific to Fortran. It also occurs for C and CXX (at least).|
edited on: 2014-09-10 16:52
Also, it should be noted that this bug, together with bug 0009220, mean that the "OPTIONAL" flag for enable_language is completely broken - at least I can think of no case where it actually works without a workaround.
Maybe a note could be added to the docs for enable_language explaining that the "OPTIONAL" feature does not currently work.
I cannot reproduce the problem with the testcase from comment 2 using cmake 184.108.40.206 (on Debian).
I can still reproduce the problem with cmake 2.6.4, so it looks like this bug has been fixed :-).
Can someone close this bug (I'm not authorized)?
In case it helps, I ran the testcase with different CMake versions (always running "cmake .. ; make"). Results:
2.6.4, 2.8.2, 2.8.9:
error as describe in this bug
"make" re-runs the complete CMake run, but then the build works (this looks like the problem described in bug 9220 )
fixed (CMake finishes without errors, "make" does nothing as expected)
Brad King (manager)
Resolving as duplicate of 0009220. Even though this one came first, there is more discussion in that one.
Robert Maynard (manager)
|Closing resolved issues that have not been updated in more than 4 months.|
|2009-01-05 09:54||trigger-debian||New Issue|
|2009-01-05 09:56||trigger-debian||Note Added: 0014466|
|2009-01-07 14:26||Bill Hoffman||Status||new => assigned|
|2009-01-07 14:26||Bill Hoffman||Assigned To||=> Bill Hoffman|
|2009-08-22 23:07||Greg Sharp||Note Added: 0017182|
|2009-08-22 23:11||Greg Sharp||Note Edited: 0017182|
|2012-05-18 10:14||sleske||Note Added: 0029508|
|2012-05-18 10:36||sleske||Note Added: 0029509|
|2012-07-02 14:27||sleske||Note Edited: 0029509|
|2012-10-15 11:32||David Cole||Relationship added||related to 0010227|
|2012-10-15 11:32||David Cole||Relationship added||related to 0009220|
|2014-09-10 16:52||sleske||Note Added: 0036779|
|2014-09-10 16:52||sleske||Note Edited: 0029509|
|2014-09-10 18:30||sleske||Note Added: 0036780|
|2015-02-06 14:10||Brad King||Note Added: 0037939|
|2015-02-06 14:10||Brad King||Assigned To||Bill Hoffman =>|
|2015-02-06 14:10||Brad King||Status||assigned => resolved|
|2015-02-06 14:10||Brad King||Resolution||open => duplicate|
|2015-07-08 08:57||Robert Maynard||Note Added: 0039044|
|2015-07-08 08:57||Robert Maynard||Status||resolved => closed|
|Copyright © 2000 - 2018 MantisBT Team|