[CMake] OS X Fortran flags
Bill Somerville
bill at classdesign.com
Fri Oct 24 14:15:23 EDT 2014
On 24/10/2014 19:11, Brad King wrote:
HI Brad,
> 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 for looking at this so quickly.
Can I just put the patched module in my project Modules directory or do
I have to build the whole CMake project?
>
> Thanks,
> -Brad
Regards
Bill.
>
>
> 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