No Fortran Compiler Could be Found...Tried Everything
I am completely new to cmake and compiling. I am trying to compile a dll for the program OpenFAST developed by NREL. They provide the .f90 file and a CMakeLists file. Their instruction for Windows are to use execute "cmake -G "Visual Studio XXX", filling in the version of Visual Studio I have.
I am stuck at the file not finding a Fortran compiler. I downloaded Simply Fortran 2, which includes gfortran, and Intel Parallel Studio 2018, which has ifort. Both of these are added to the PATH, and I get a response when I type them in to any command window. So I know the path to ifort and gfortran works correctly. I downloaded Intel Parallel Studio XE 2018, CMake 3.10.2, and Visual Studio Community 2017. I had read there were issues with PSXE 2017 not integrating with VS 2017, but that it was resolved in PSXE 2018.
I have attached the CMakeLists file. I added line 19, set(FC "path to ifort") to try to force the program to recognize ifort. I tried this with gfortran as well, and without the full path for both since the directories are in the PATH. The error occurs with line 20, when it tries to enable the language. It says "The Fortran compiler identification is unknown...No CMAKE_Fortran_COMPILER could be found".
Please, I've searched everywhere online for topics like this. I've been trying to get this to compile for six days. I don't know what I'm doing wrong. If I'm editing the CMakeLists file to specify the compiler to use, which is not even a good practice from what I've read, I don't know what else I can do.