Is there any way to check if a working Fortran compiler exists without triggering an error if one cannot be found? My project only requires C and a Fortran compiler is not required (not having one would simply disable some modules but should not stop the build). <br>
<br>Simply including ENABLE_LANGUAGE(Fortran) doesn't work the way I need it, since it throws an error if a Fortran compiler is not found. So I tried next to create a CMakeLists.txt on the fly and run TRY_COMPILE from my main CMakeLists.txt, assuming that an error (due to a non-existent Fortran compiler) in the CMakeLists.txt file that I create would be intercepted in the result variable of TRY_COMPILE. No luck, it seems that the error is propagated all the way up. Is that the way TRY_COMPILE is intended to work? <br>
<br>Any thoughts on what to try next?<br><br>Thanks,<br>--Radu<br><br>