[CMake] OS X Fortran flags

Bill Somerville bill at classdesign.com
Fri Oct 24 16:29:32 EDT 2014


On 24/10/2014 19:16, Brad King wrote:
Hi Brad,
> On 10/24/2014 02:15 PM, Bill Somerville wrote:
>> Can I just put the patched module in my project Modules directory or do
>> I have to build the whole CMake project?
> No need to recompile.  You can just add the two lines directly in your
> Modules directory.
Sorry, I am struggling with this. I have copied the 
Darwin-GNU-Fortran.cmake file into my project modules directory and 
patched it as you suggested. I have tried putting it into a subdirectory 
called Platform/ as well. I have added my local modules path to the 
CMAKE_MODULE_PATH before the default items. This is set before the 
project() command in the project CMakelists.txt but it is not being 
picked up. Is there something I am missing or do I need to do this a 
different way?

The good news is that it works when I patch the file in the actual CMake 
installation although there is an oddity, when I configure the project I 
see the messages from those two new function calls in the Fortran checks 
but strangely I don't see similar messages from the C and C++ compiler 
checks, yet they all seem to work adding the correct options.
>
> -Brad
>
Regards
Bill.


More information about the CMake mailing list