← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/trunk] Rev 6416: Merge BLAS cmake updates.

 

On Tue, Nov 8, 2011 at 11:21 AM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> On 8 November 2011 09:06, Johannes Ring <johannr@xxxxxxxxx> wrote:
>> Can we remove the call to enable_language(Fortran) in
>> FindArmadillo.cmake? It makes the configuration fail when there is no
>> Fortran compiler, like on OS X.
>
> The test CMake files don't work without it - they need a Fortran
> compiler to test that the BLAS lib contains a function.
>
> Not sure what's best. Our old BLAS test was poor, and it would be good
> not to write our own. See
>
>  http://www.mail-archive.com/cmake@xxxxxxxxx/msg22673.html
>
> Maybe we can hack the CMake provided FindBLAS.cmake to skip some checks for OSX?

FindBLAS/FindLAPACK works fine on OS X without calling
enable_language(Fortran) in FindArmadillo.cmake. I tried to use
enable_language(Fortran OPTIONAL) but that does not work because of a
bug in CMake:

  http://public.kitware.com/Bug/view.php?id=9220

The workaround listed there could be used to check if it is safe to
use enable_language(Fortran). Just add language_support.cmake (v2) in
cmake/modules and add the following in FindArmadillo.cmake (or perhaps
better in the main CMakeLists.txt file?):

  include(language_support)
  workaround_9220(Fortran Fortran_language_works)
  if (Fortran_language_works)
    enable_language(Fortran)
  endif()

Johannes


Follow ups

References