[CMake] cmake problem with nmake and intel fortran for 64 bit

Paul Edwards paul.m.edwards at gmail.com
Tue Aug 31 08:30:17 EDT 2010


Hi,

*
*

I'm having a problem with cmake-2.8 (from website) on windows.  The cmake
command fails detecting the Intel fortran compiler when generating "NMake
Makefiles" although it does work for visual studio - see output at end.  I
would like to get this working with nmake - can anyone help?  Or, could
someone give me some pointers for debugging this - are there any flags you
can pass to cmake to output more information about what it is doing and
leave the temporary files?


Thanks in advance,
Paul


**
*

Doesn't work for nmake:



D:\scratch\fortran-test\build>cmake -G "NMake Makefiles" ..\source

-- The CXX compiler identification is MSVC

-- The Fortran compiler identification is Intel

-- The C compiler identification is MSVC

-- Check for CL compiler version

-- Check for CL compiler version - 1500

-- Check if this is a free VC compiler

-- Check if this is a free VC compiler - no

-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio 9.0/VC/bin/x86_amd64/cl.exe

-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio 9.0/VC/bin/x86_amd64/cl.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - failed

-- Check for working Fortran compiler: C:/Program Files
(x86)/Intel/Compiler/Fortran/10.1.021/em64t/bin/ifort.exe

-- Check for working Fortran compiler: C:/Program Files
(x86)/Intel/Compiler/Fortran/10.1.021/em64t/bin/ifort.exe  -- broken

CMake Error at C:/CMake
2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:40 (MESSAGE):

  The Fortran compiler "C:/Program Files

  (x86)/Intel/Compiler/Fortran/10.1.021/em64t/bin/ifort.exe" is not able to

  compile a simple test program.



  It fails with the following output:



   Change Dir: D:/scratch/fortran-test/build/CMakeFiles/CMakeTmp







  Run Build Command:nmake /NOLOGO "cmTryCompileExec\fast"



        "C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\nmake.exe" -f

  CMakeFiles\cmTryCompileExec.dir\build.make /nologo -L

  CMakeFiles\cmTryCompileExec.dir\build



        "C:\CMake 2.8\bin\cmake.exe" -E cmake_progress_report

  D:\scratch\fortran-test\build\CMakeFiles\CMakeTmp\CMakeFiles 1



  Building Fortran object

  CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.obj



        C:\PROGRA~2\Intel\Compiler\Fortran\101~1.021\em64t\bin\ifort.exe

  @C:\Users\u522140\AppData\Local\Temp\nmAA5C.tmp



  Linking Fortran executable cmTryCompileExec.exe



        "C:\CMake 2.8\bin\cmake.exe" -E vs_link_exe

  C:\PROGRA~2\Intel\Compiler\Fortran\101~1.021\em64t\bin\ifort.exe /nologo

  @CMakeFiles\cmTryCompileExec.dir\objects1.rsp

  @C:\Users\u522140\AppData\Local\Temp\nmAAF9.tmp



  LINK : warning LNK4068: /MACHINE not specified; defaulting to X86



  CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.obj : fatal error

  LNK1112: module machine type 'x64' conflicts with target machine type

  'X86'



  LINK Pass 1 failed.  with 1112



  NMAKE : fatal error U1077: '"C:\CMake 2.8\bin\cmake.exe"' : return

  code '0xffffffff'



  Stop.



  NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio

  9.0\VC\BIN\nmake.exe"' : return code '0x2'



  Stop.











  CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

  CMakeLists.txt:1 (PROJECT)





-- Configuring incomplete, errors occurred!



D:\scratch\fortran-test\build>
***

*
*

*But, works for Visual Studio 9 2008:*



D:\scratch\fortran-test\build>cmake ..\source

-- Building for: Visual Studio 9 2008

-- Check for working CXX compiler using: Visual Studio 9 2008

-- Check for working CXX compiler using: Visual Studio 9 2008 -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working Fortran compiler using: Visual Studio 9 2008

-- Check for working Fortran compiler using: Visual Studio 9 2008  -- works

-- Detecting Fortran compiler ABI info

-- Detecting Fortran compiler ABI info - done

-- Checking whether C:/Program Files
(x86)/Intel/Compiler/Fortran/10.1.021/em64t/bin/ifort.exe supports Fortran
90

-- Checking whether C:/Program Files
(x86)/Intel/Compiler/Fortran/10.1.021/em64t/bin/ifort.exe supports Fortran
90 -- yes

-- Check for working C compiler using: Visual Studio 9 2008

-- Check for working C compiler using: Visual Studio 9 2008 -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Configuring done

-- Generating done

-- Build files have been written to: D:/scratch/fortran-test/build



D:\scratch\fortran-test\build>



*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100831/7e8d444f/attachment-0001.htm>


More information about the CMake mailing list