[cmake-developers] Fortran detection, issue 9220
Brad King
brad.king at kitware.com
Wed Feb 11 09:44:26 EST 2015
On 02/11/2015 09:26 AM, Ben Boeckel wrote:
> A sketch for anyone interested (probably still not complete, but it's
> things to look for):
>
> - change cmGlobalGenerator::EnableLanguage to return a bool;
> - add CMAKE_<LANG>_FOUND variables to indicate support for a language
> is available;
We already guarantee that CMAKE_<LANG>_COMPILER is set, so we could indicate
failure simply by having it not set.
Also one would need to decide what determines whether an optional language
is not available. If a compiler is available but cannot compile binaries,
should that be an error or tolerated as "not available"? As a user I would
expect setting FC=/path/to/gfortran in my environment before calling CMake
to cause Fortran to be enabled if the project wants it or else an error.
> - trigger an error when build rules for an unsupported language are
> encountered.
We already treat unknown extensions like .txt files in most cases, so
this would have to be specific to languages that were OPTIONAL and failed
to be enabled.
-Brad
More information about the cmake-developers
mailing list