[CMake] Problem with backslash in path

Ken Fast kfast at gdeb.com
Wed Mar 13 09:02:19 EDT 2013


I am using CMake to build LAPACK on a Windows (x64) machine with msys 
make, MinGW x64 FORTRAN compiler, and Visual Studio C/C++ compilers.  When 
CMake tries to test the FORTRAN compiler it fails with the following 
message:

Check for working Fortran compiler: 
D:/Tools/MinGW/x86_64-w64-mingw32/bin/gfortran.exe  -- broken
CMake Error at 
D:/Tools/CMake/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:54 
(message):
  The Fortran compiler 
"D:/Tools/MinGW/x86_64-w64-mingw32/bin/gfortran.exe"
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: D:/Tools/lapack/build/CMakeFiles/CMakeTmp

  Run Build Command:D:/Tools/MinGW/msys/1.0/bin/make.exe
  "cmTryCompileExec1858728888/fast"

  /usr/bin/make -f CMakeFiles\cmTryCompileExec1858728888.dir\build.make
  CMakeFiles/cmTryCompileExec1858728888.dir/build

  'mTryCompileExec1858728888.dir' is not recognized as an internal or
  external command,

  operable program or batch file.

  make: *** [cmTryCompileExec1858728888/fast] Error 1

The offending line seems to be: /usr/bin/make -f 
CMakeFiles\cmTryCompileExec1858728888.dir\build.make

I have consistently used forward (UNIX) slashes in all path names.  This 
path name gets generated by CMake with backslashes.  It appears to be a 
temporary directly.  I could not find any way to explicitly specify a path 
for this directory.

In searching I have found other reports of similar problems with CMake, 
but no solutions.

Windows XP/64
CMake 2.8.9 or 2.8.10.2 (same problem in both)
MinGW x64
msys





 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130313/80ab1990/attachment.htm>


More information about the CMake mailing list