Topic: Problem Using CMake with the Simply Fortran GNU compilers v14.1.0
I am trying to use CMake to build the open source NJOY 2016 code from Los Alamos National Laboratory on my Windows 10 Professional v22H2 system. It comes with a CMakeLists.txt file and CMake will search for the Fortran compiler on a system. The GNU compilers from the Simply Fortran package are in their standard locations as reflected in the Windows path. I also have Visual Studio 2022 Community version installed but it is not in the path. I also have Python 3.13 installed and in the path. CMake finds the Python installation correctly but cannot find the GNU Fortran. It does find the Visual Studio installation but there is no Fortran associated with that so the build fails. The NJOY developers at Los Alamos advised me to add the following line to the CMake command line:
-DCMAKE_Fortran_COMPILER=/my/path/to/fortran/compiler.exe, which for me is
-DCMAKE_Fortran_COMPILER="C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin\gfortran.exe".
This does not help. I have tried this command line option with and without double and single quotes and with both backward and forward slashes to no avail.
So far neither the developers nor anyone at the CMake Discourse web site has suggested a solution that works. I don't expect anyone here to give advice on CMake since it is not your product. However, I suspect the problem may have something to do with the spaces in the path to the GNU compilers. If I install Simply Fortran to a location that has no spaces in the path, for example
C:\SimplyFortran\mingw-w64\..., will that adversely affect the normal operation of Simply Fortran with your GUI interface?