[CMake] What do I need to do to insure that CMake uses gfortran?
Nils Gladitz
nilsgladitz at gmail.com
Thu Apr 3 17:37:27 EDT 2014
On 03.04.2014 23:07, Conan wrote:
>
> I have my env var FC set to /usr/bin/gfortran. This is verified by
> the line MESSAGE("FC = " $ENV{FC}). However
> GET_FILENAME_COMPONENT(Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER}
> NAME) sets Fortran_COMPILER_NAME to f95. I thought by setting the FC
> env var I could for the use of gfortran.
>
> What do I need to do to insure that CMake uses gfortran?
>
Did you try with a fresh build directory?
You can not change the compiler once it has been configured.
CMake only uses the FC environment variable when Fortran is enabled for
the first time.
Nils
More information about the CMake
mailing list