I have been getting this error from my cmake-gui window when compiling my C++/Fortran based project.
The Fortran compiler identification is unknown CMake Error at Lib/Fast_Table/CMakeLists.txt:2 (project): No CMAKE_Fortran_COMPILER could be found.
I have looked all over the internet for possible solutions to my problem regarding the path and configuration between intel Fortran 2020, VS2017 and CMake 3.18.4.
Here is the CMakeError.log output:
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft Visual Studio 2017 Version 15.0.28307.1525.
Copyright (C) Microsoft Corp. All rights reserved.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
1>------ Build started: Project: CompilerIdFortran, Configuration: Debug x64 ------
1>Compiling with Intel(R) Visual Fortran Compiler 19.1.0.166 [Intel(R) 64]...
1>CMakeFortranCompilerId.F
1>Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
1>Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
1>Linking...
1>Microsoft (R) Incremental Linker Version 14.16.27045.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>/OUT:.\CompilerIdFortran.exe
1>/INCREMENTAL:NO
1>/MANIFEST
1>/MANIFESTFILE:Debug\CompilerIdFortran.exe.intermediate.manifest
1>"/MANIFESTUAC:level='asInvoker' uiAccess='false'"
1>/DEBUG
1>/PDB:C:\tree2\CAE\_build\CNApps\CMakeFiles\3.18.4\CompilerIdFortran\CompilerIdFortran.pdb
1>/SUBSYSTEM:CONSOLE
1>/IMPLIB:C:\tree2\CAE\_build\CNApps\CMakeFiles\3.18.4\CompilerIdFortran\CompilerIdFortran.lib
1>Debug\CMakeFortranCompilerId.obj
1>LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
1>
1>Build log written to "file://C:\tree2\CAE\_build\CNApps\CMakeFiles\3.18.4\CompilerIdFortran\Debug\BuildLog.htm"
1>CompilerIdFortran - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft Visual Studio 2017 Version 15.0.28307.1525.
Copyright (C) Microsoft Corp. All rights reserved.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
Package 'IFLangServicePackage' failed to load.
1>------ Build started: Project: CompilerIdFortran, Configuration: Debug x64 ------
1>Compiling with Intel(R) Visual Fortran Compiler 19.1.0.166 [Intel(R) 64]...
1>CMakeFortranCompilerId.F
1>Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
1>Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
1>Linking...
1>Microsoft (R) Incremental Linker Version 14.16.27045.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>/OUT:.\CompilerIdFortran.exe
1>/INCREMENTAL:NO
1>/MANIFEST
1>/MANIFESTFILE:Debug\CompilerIdFortran.exe.intermediate.manifest
1>"/MANIFESTUAC:level='asInvoker' uiAccess='false'"
1>/DEBUG
1>/PDB:C:\tree2\CAE\_build\CNApps\CMakeFiles\3.18.4\CompilerIdFortran\CompilerIdFortran.pdb
1>/SUBSYSTEM:CONSOLE
1>/IMPLIB:C:\tree2\CAE\_build\CNApps\CMakeFiles\3.18.4\CompilerIdFortran\CompilerIdFortran.lib
1>Debug\CMakeFortranCompilerId.obj
1>LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
1>
1>Build log written to "file://C:\tree2\CAE\_build\CNApps\CMakeFiles\3.18.4\CompilerIdFortran\Debug\BuildLog.htm"
1>CompilerIdFortran - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Let me know if anything else is needed, thanks!