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?

Community
  • 1
  • 1
  • What's your C compiler? Have you specified the toolchain (-T) to be the Intel compiler suite? Maybe you need a more recent CMake version which knows about your Intel XE version. – usr1234567 Jan 10 '16 at 09:53

1 Answers1

2

CMake can not build a test project width the new intel fortran composer XE 2013 but there is a workaround.

Add this line to your CMakeLists.txt file: SET (CMAKE_Fortran_COMPILER_FORCED true)

This will prevent CMake from looking for a fortran compiler and skip the test program. For it to work you will have to specify the fortran compiler manually but you already did that :)

I hope it helps.

Mikkel L
  • 31
  • 2
  • I modified the CMakeLists.txt file I found in the magma folder, as you suggested, but I still get the same error. Is the one I modified the right file, or should I look for it somewhere else? – user3389242 Mar 16 '14 at 19:49