[CMake] NMake + Compiler wrapper

Roland Schulz roland at utk.edu
Tue Jun 19 01:48:09 EDT 2012


Hi,

should it work to use the NMake generator with a compiler wrapper like
mpicc? If I try to use the mpicc from OpenMPI 1.6 it doesn't work (see
below for messages). This is with cmake 2.8.8 and both with standard nmake
and nmake-jom. It works fine without the wrapper and it also works find to
compile a test program outside of cmake with the wrapper.

Roland

-- The C compiler identification is MSVC 16.0.40219.1
-- The CXX compiler identification is MSVC 16.0.40219.1
-- Check for working C compiler: c:/Program Files
(x86)/OpenMPI_v1.6-x64/bin/mpicc.exe
-- Check for working C compiler: c:/Program Files
(x86)/OpenMPI_v1.6-x64/bin/mpicc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "c:/Program Files (x86)/OpenMPI_v1.6-x64/bin/mpicc.exe" is
  not able to compile a simple test program.

  It fails with the following output:

   Change Dir:
C:/Users/Roland/git/gromacs.dev/msvc64.cuda5.mpi/CMakeFiles/CMakeTmp



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

        "c:\Program Files (x86)\Microsoft Visual Studio
  10.0\VC\BIN\amd64\nmake.exe" -f
  CMakeFiles\cmTryCompileExec1137735111.dir\build.make /nologo -L
  CMakeFiles\cmTryCompileExec1137735111.dir\build

        "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E
cmake_progress_report

C:\Users\Roland\git\gromacs.dev\msvc64.cuda5.mpi\CMakeFiles\CMakeTmp\CMakeFiles
  1

  Building C object
  CMakeFiles/cmTryCompileExec1137735111.dir/testCCompiler.c.obj

        c:\PROGRA~2\OPENMP~1.6-X\bin\mpicc.exe -o
  CMakeFiles\cmTryCompileExec1137735111.dir\testCCompiler.c.obj -c

C:\Users\Roland\git\gromacs.dev\msvc64.cuda5.mpi\CMakeFiles\CMakeTmp\testCCompiler.c


  Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.



  cl : Command line warning D9035 : option 'o' has been deprecated and will
  be removed in a future release

  testCCompiler.c

  Linking C executable cmTryCompileExec1137735111.exe

        c:\PROGRA~2\OPENMP~1.6-X\bin\mpicc.exe
  "CMakeFiles\cmTryCompileExec1137735111.dir\testCCompiler.c.obj" -o
  cmTryCompileExec1137735111.exe

  Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.



  cl : Command line warning D9035 : option 'o' has been deprecated and will
  be removed in a future release

  testCCompiler.c.obj

  c1 : fatal error C1083: Cannot open source file:
  'CMakeFiles\cmTryCompileExec1137735111.dir\testCCompiler.c.obj': No such
  file or directory

  NMAKE : fatal error U1077: 'c:\PROGRA~2\OPENMP~1.6-X\bin\mpicc.exe' :
  return code '0x2'

  Stop.

  NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual
Studio
  10.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'

  Stop.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)
-- 
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120619/7b8ce4bb/attachment.htm>


More information about the CMake mailing list