[CMake] MinGW Makefile fails make test

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Feb 27 00:25:37 EST 2013


On 2013-02-26 17:57-0800 Donald Robinson wrote:

> This is a repost (and rewording) of an earlier post "Setting
> CMAKE_BUILD_TOOL or CMAKE_MAKE_PROGRAM with MinGW tools," which garnered no
> response. Hopefully this post is clearer:
>
>
>
> I have Cmake 2.8.8 installed along with MinGW 4.7.2 on Windows XP with no
> other development tools. I would like this project to build using only MinGW
> tools, if possible. The project includes C and Fortran code, and those are
> both recognized (GNU 4.7.2 and GNU, respectively) and correctly generate
> simple test programs. However, Cmake fails at the next step with this
> message:
>
>
>
>   Cmake Error: Generator: execution of make failed. Make command was: nmake
> /NOLOGO "cmTryCompileExec970418286\fast"
>
>
>
> I cannot understand why it would be calling 'nmake' and not
> 'mingw32-make.exe'. I added this to my CMakeLists.txt file:
>
>
>
>   SET(CMAKE_BUILD_TOOL C:/MinGW/bin/mingw32-make.exe)
>
>
>
> But this has not helped.

I wonder if the issue is something simple like a failure on your part
to specify the correct generator for a MinGW system without MSYS,
i.e.,

cmake -G "MinGW Makefiles"

I don't use that generator very much.  I prefer -G "MSYS Makefiles"
because the test targets configured for my various software build
systems tend to use MSYS executables such as bash.exe.  However,
whenever I have tried "MinGW Makefiles" it has worked for me.  All my
good -G "MSYS Makefiles" and -G "MinGW Makefiles" results for cmake
have been achieved on the Wine version of Windows, but I think the
version of Windows should not be an issue this case.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list