CMAKE_Fortran_Compiler before project(xxx), so that this variable can never gets overridden later, but clearly this is not the best way, since I need gfortran if there turns out to be no ifort available. By the way, what's the best place to look for this kind of information? The documentation does not seem to be very complete.. Thanks, Roc