MantisBT - CMake
View Issue Details
0016039CMakeCMakepublic2016-03-30 15:052016-06-10 14:21
Melven Roehrig-Zoellner 
 
normalminoralways
closedno change required 
Windows
CMake 3.5 
 
0016039: if( languages MATCHES c) always true for pure Fortran projects
A lot of Modules (for example findBLAS.cmake, findLAPACK.cmake) do checks of the form:

get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )
if( _LANGUAGES_ MATCHES C )
...

Even in pure Fortran projects this is always true on windows systems as the RC language is added automatically (and Fortran;RC MATCHES C).
Create a pure Fortran project and call find_package(LAPACK).
No tags attached.
Issue History
2016-03-30 15:05Melven Roehrig-ZoellnerNew Issue
2016-03-30 15:51Ben BoeckelNote Added: 0040770
2016-03-30 16:14Melven Roehrig-ZoellnerNote Added: 0040771
2016-03-30 16:30Ben BoeckelNote Added: 0040772
2016-04-01 08:46Melven Roehrig-ZoellnerNote Added: 0040789
2016-04-01 11:27Rolf Eike BeerNote Added: 0040797
2016-04-01 11:27Rolf Eike BeerSeveritymajor => minor
2016-04-01 11:27Rolf Eike BeerStatusnew => resolved
2016-04-01 11:27Rolf Eike BeerResolutionopen => no change required
2016-04-05 10:03Brad KingNote Added: 0040813
2016-06-10 14:21Kitware RobotNote Added: 0041201
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0040770)
Ben Boeckel   
2016-03-30 15:51   
That kind of check is wrong and should instead use list(FIND) to see if the language is enabled.
(0040771)
Melven Roehrig-Zoellner   
2016-03-30 16:14   
Ok, then this is just a bug in FindBLAS.cmake and FindLAPACK.cmake...
(0040772)
Ben Boeckel   
2016-03-30 16:30   
Hrm, would seem so. I'll try out a patch here.
(0040789)
Melven Roehrig-Zoellner   
2016-04-01 08:46   
I've sent a patch to the developers Mailing list; I hope we didn't do the same work twice...
(0040797)
Rolf Eike Beer   
2016-04-01 11:27   
cmake --help-variable 'CMAKE_<LANG>_COMPILER_LOADED'

-> if (CMAKE_Fortran_COMPILER_LOADED)
(0040813)
Brad King   
2016-04-05 10:03   
Find{BLAS,LAPACK}: Fix when used in pure Fortran projects
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1694112d [^]
(0041201)
Kitware Robot   
2016-06-10 14:21   
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.