[cmake-developers] New module: CheckFortranCompilerFlag.cmake

Brad King brad.king at kitware.com
Tue Feb 3 15:18:06 EST 2015


On 02/03/2015 07:46 AM, Nicolas Bock wrote:
> please find attached a patch based on 460f7bcb7d11e905ee025c9d9cc9629d597fa91b.

Thanks.  Was this based on CheckCCompilerFlag from that version too?

On 02/01/2015 04:18 AM, Rolf Eike Beer wrote:
> Also I don't know if it makes sense to check for certain flags that look
> specific to C++. Which compilers did you use to test?

Agreed.  Do you have example failure messages from any compilers?

Local testing of GNU Fortran 4.9 shows that bad flags are rejected with
an error.  Do we need the pattern matches for any Fortran compilers?

> +     # Some compilers do not fail with a bad flag
> +     FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU
> +     ${_CheckFortranCompilerFlag_COMMON_PATTERNS}

Certainly the "but not for C" message will not show up from a
Fortran compiler.

Thanks,
-Brad



More information about the cmake-developers mailing list