[CMake] MSYS and Intel Fortran/MSVC/C++

Bill Hoffman bill.hoffman at kitware.com
Fri Jan 4 09:09:58 EST 2013


On 1/4/2013 3:31 AM, Arjen Markus wrote:
> Hi Bill, Alan,
>
> just to make sure, I checked that there is an e-drive
> and a directory temp on that drive. These settings are
> the same as always when I use the MSVC/C++ or Intel Fortran
> compilers.
>
> My guess is that the use of the forward slash is messing
> up the argument parsing:
>
> - cl uses both "/" and "-" as the start characters for
>    a command-line option.
> - MSYS uses the forward slash to separate path components
>    and in this particular case both forward and backward
>    slashes occur.
> - cl is complaining about a file called "e:", not "e:/temp"
>
> (The DOS shell can use both forward and backward slashes
> by the way as a path separator, but it is not consistent
> in this - path completion only works for backward slashes
> for instance)
>
> This means that the MSYS shell can not be readily used
> to generate the makefiles. An alternative I can imagine is
> that I use the DOS shell and make the MinGW/MSYS utilities available via
> the path.
>

I suspect you might be right.  I am thinking this is MSYS messing with 
the command line somehow.  Can you build with nmake and a DOS shell? 
If so, can you then go into that tree with the msys shell and try to build?

Some other things you can try:
add --debug-trycompile to the cmake command line.  This will leave the 
files in CMakeFiles/CMakeTmp.  You can then cd into there and run nmake 
from the command line and look at the makefiles.  I don't think CMake is 
doing the mixed path stuff.  I think this is a bad interaction with 
nmake and msys.


-Bill


More information about the CMake mailing list