[CMake] OS X Fortran flags

Brad King brad.king at kitware.com
Fri Oct 24 14:11:28 EDT 2014


On 10/24/2014 11:31 AM, Bill Somerville wrote:
> So what am I missing? A brief scan of the CMake sources looks like it 
> should be doing this right for GNU compilers as the compiler tests 
> should check for those options being supported and supply them.

It looks like a couple of lines are missing for Fortran.
Please try the patch below (untested).

Thanks,
-Brad


diff --git a/Modules/Platform/Darwin-GNU-Fortran.cmake b/Modules/Platform/Darwin-GNU-Fortran.cmake
index f4b509a..6724f9b 100644
--- a/Modules/Platform/Darwin-GNU-Fortran.cmake
+++ b/Modules/Platform/Darwin-GNU-Fortran.cmake
@@ -14,6 +14,8 @@

 include(Platform/Darwin-GNU)
 __darwin_compiler_gnu(Fortran)
+cmake_gnu_set_sysroot_flag(Fortran)
+cmake_gnu_set_osx_deployment_target_flag(Fortran)

 set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
 set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ")



More information about the CMake mailing list