[CMake] Fortran MinGW on Windows

Brad King brad.king at kitware.com
Thu Jun 13 08:39:11 EDT 2013


On 06/12/2013 12:55 AM, Leek, Jim wrote:
> I couldn't find any documentation on it either way.  But I should have had
> enable_language(Fortran) in the main CMakeLists.txt file

Great, I'm glad you found the solution.  Thanks for reporting back.

The command documentation:

 http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:enable_language

includes the phrase

 "the language enabled can only be used in the calling project or its
  subdirectories"

However, it is not clear that "used" includes transitive link dependencies.
I've updated the documentation to state that explicitly:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3b57e7a
 "Furthermore, it must be called in the highest directory common to "
 "all targets using the named language directly for compiling sources "
 "or indirectly through link dependencies.  "
 "It is simplest to enable all needed languages in the top-level "
 "directory of a project."

-Brad


More information about the CMake mailing list