0

I'm trying to compile Magma-1.4.1 for Microsoft Visual Studio Professional 2013 on Windows 7-64 bit using CMake 2.8.12.2. I also installed the Intel Fortran Compiler.

I open CMake -> I specify the path for the source code and for the binaries -> I click on Configure -> I select Visual Studio 12 Win64 with the option Specify native compilers -> I specify the path for the Fortran Compiler (C:/Program Files (x86)/Intel/Composer XE 2013 SP1/bin/intel64/ifort.exe).

During the generation, the build always fails giving the following error:

Check for working Fortran compiler using: Visual Studio 12
Check for working Fortran compiler using: Visual Studio 12 -- broken

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:54 (message): The Fortran compiler "ifort" is not able to compile a simple test program.

I had already added the ifort.exe path to the environment variables.

I have tried all the possible combinations of 32 and 64 bit both for the version of Visual Studio and for the Intel Fortan Compiler, but I still get the same error. I have also tried to use the native compilers but I obtain the same result.

If I open Visual Studio and I create a Fortan project, instead, I can build and run it without issues.

Could anybody help, please?

4

1 回答 1

2

CMake 无法为新的 intel fortran composer XE 2013 构建测试项目宽度,但有一种解决方法。

将此行添加到您的 CMakeLists.txt 文件中: SET (CMAKE_Fortran_COMPILER_FORCED true)

这将阻止 CMake 寻找 fortran 编译器并跳过测试程序。要使其工作,您必须手动指定 fortran 编译器,但您已经这样做了:)

我希望它有所帮助。

于 2014-03-12T13:06:35.240 回答