MantisBT - CMake
View Issue Details
0014656CMakeModulespublic2013-12-18 17:442015-01-05 08:39
Nicolas Bock 
Brad King 
normalminorN/A
closedfixed 
CMake 2.8.11.2 
CMake 3.1CMake 3.1 
0014656: FindOpenMP does not return Fortran flags
The FindOpenMP modules assumes C/C++ code. For a pure Fortran project this is not very useful, as the C/C++ compiler flags don't always translate, or are not determinable because only a Fortran frontend of the compiler is installed. Ideally the module checks for OpenMP flags only for the languages the project is configured for.
No tags attached.
? FindOpenMP.cmake (6,715) 2014-08-06 10:08
https://public.kitware.com/Bug/file/5216/FindOpenMP.cmake
? CheckFortranSourceCompiles.cmake (3,586) 2014-08-06 10:08
https://public.kitware.com/Bug/file/5217/CheckFortranSourceCompiles.cmake
patch ebd8fa22+0001-Add-CheckFortranSourceCompiles-module-14656.patch (7,137) 2014-08-06 10:59
https://public.kitware.com/Bug/file/5218/ebd8fa22%2B0001-Add-CheckFortranSourceCompiles-module-14656.patch
patch ebd8fa22+0002-FindOpenMP-Add-support-for-Fortran-14656.patch (3,172) 2014-08-06 10:59
https://public.kitware.com/Bug/file/5219/ebd8fa22%2B0002-FindOpenMP-Add-support-for-Fortran-14656.patch
Issue History
2013-12-18 17:44Nicolas BockNew Issue
2014-08-06 10:08Nicolas BockFile Added: FindOpenMP.cmake
2014-08-06 10:08Nicolas BockFile Added: CheckFortranSourceCompiles.cmake
2014-08-06 10:09Nicolas BockNote Added: 0036561
2014-08-06 10:59Brad KingFile Added: ebd8fa22+0001-Add-CheckFortranSourceCompiles-module-14656.patch
2014-08-06 10:59Brad KingFile Added: ebd8fa22+0002-FindOpenMP-Add-support-for-Fortran-14656.patch
2014-08-06 11:00Brad KingNote Added: 0036563
2014-08-18 11:22Brad KingNote Added: 0036634
2014-08-19 09:47Brad KingNote Added: 0036644
2014-08-19 09:47Brad KingAssigned To => Brad King
2014-08-19 09:47Brad KingStatusnew => assigned
2014-08-19 09:47Brad KingTarget Version => CMake 3.1
2014-08-20 09:23Michael Klemm (Intel)Note Added: 0036654
2014-08-20 09:24Michael Klemm (Intel)Note Deleted: 0036654
2014-08-21 10:36Brad KingStatusassigned => resolved
2014-08-21 10:36Brad KingResolutionopen => fixed
2014-08-21 10:36Brad KingFixed in Version => CMake 3.1
2015-01-05 08:39Robert MaynardNote Added: 0037619
2015-01-05 08:39Robert MaynardStatusresolved => closed

Notes
(0036561)
Nicolas Bock   
2014-08-06 10:09   
I have modified the existing (2.8.12.2) version of FindOpenMP.cmake to include a test for Fortran compilers. In addition I have modified the existing CheckCSourceCompiles.cmake to compile Fortran code. Could you look over the two attached scripts?

Thanks
(0036563)
Brad King   
2014-08-06 11:00   
Re 0014656:0036561: Thanks. Based on those I constructed patches

 ebd8fa22+0001-Add-CheckFortranSourceCompiles-module-14656.patch
 ebd8fa22+0002-FindOpenMP-Add-support-for-Fortran-14656.patch

They are based on the Git 'master' version of CMake as of commit ebd8fa22. Please try it out.
(0036634)
Brad King   
2014-08-18 11:22   
The first patch has been applied:

 Add CheckFortranSourceCompiles module
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7386d0d6 [^]
(0036644)
Brad King   
2014-08-19 09:47   
The second patch has been applied:

 FindOpenMP: Add support for Fortran
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d0678408 [^]
(0037619)
Robert Maynard   
2015-01-05 08:39   
Closing resolved issues that have not been updated in more than 4 months