[cmake-developers] Fortran detection, issue 9220

Ben Boeckel ben.boeckel at kitware.com
Fri Feb 6 10:21:52 EST 2015


On Fri, Feb 06, 2015 at 07:01:55 +0100, Christoph Grüninger wrote:
> would you mind to tackle issue 9220 "enable_language(.... OPTIONAL)
> signature does not work correctly"? It's a shame that CMake cannot
> properly detect optional Fortran for more than 5 years! The workaround
> from Eigen works fine for me, but it's still embarrassing.
> 
> BTW, is there a way to disable the optional Fortran by a flag to CMake?
> I couldn't find any...

Here is a commit which I haven't worked on for a while which delays the
error until you request an actual build of a Fortran object:

    https://github.com/mathstuf/CMake/commit/880d783bf7fbd986b8a50a712e69ff40abbcfa07

While not the OPTIONAL signature, it is more accurate. Let me know how
it works for you.

--Ben


More information about the cmake-developers mailing list