CMake and Fortran compiler
ryandesign at macports.org
Sat Dec 10 00:17:37 PST 2011
On Dec 9, 2011, at 17:33, Mojca Miklavec wrote:
> When running ccmake <path-to-root-sources> I get the following error:
> CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeDetermineFortranCompiler.cmake:31
> Could not find compiler set in environment variable FC:
So set the FC environment variable to the path to your Fortran compiler. None is provided by Xcode, and MacPorts has several ports that could be suitable, so cmake can't know which one you want.
> I strongly suspect that this error has nothing to do with Root itself,
> but rather with some "misconfiguration" in cmake package in MacPorts
> which is not aware of Fortran being present. But I might just as well
> be wrong. (I'm neither a Fortran programmer not somebody familiar
> with CMake.)
MacPorts cmake does not declare a dependency on any port that provides a fortran compiler, nor would we want it to (since most ports using cmake have no use for fortran). So it's completely unsurprising that MacPorts cmake does not out of the box know anything about fortran.
> After setting
> export FC=/opt/local/bin/gfortran-mp-4.4
> (almost) all goes fine again.
> What do you suggest?
Then it sounds like you got it working.
More information about the macports-users