[cmake-developers] Peculiar issue for "NMake Makefiles JOM"

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Jun 10 01:25:13 EDT 2013


On 2013-06-07 17:44-0400 Bill Hoffman wrote:

> On 6/6/2013 9:44 PM, Alan W. Irwin wrote:
>> 
>> In this particular case I have specified gcc using
>> CMAKE_C_COMPILER.  That bombs with the message
>> 
>> -- Check for working C compiler: 
>> z:/home/wine/newstart/MinGW-4.7.2/bin/gcc.exe -- broken
>> 
> Did you look in the CMakeError.log file to see why it fails?

To answer that question, I went with a simple example.

project(test_jom_mingw C)
cmake_minimum_required(VERSION 2.8.10.2)

I ran it with

cmake -G"NMake Makefiles JOM" -DCMAKE_C_COMPILER=gcc .. >& cmake.out

which produced lots of error messages which I attach.

It had partial success with the C compiler testing:

bash.exe-3.1$ cat CMakeFiles/CMakeOutput.log
The system is: Windows - 5.1 - x86
Compiling the C compiler identification source file
"CMakeCCompilerId.c" succeeded.
Compiler: z:/home/wine/newstart/MinGW-4.7.2/bin/gcc.exe
Build flags:
Id flags:

The output was:
0


Compilation of the C compiler identification source
"CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in
"Z:/home/wine/newstart/test_jom/build_dir/CMakeFiles/2.8.10.2/CompilerIdC/a.exe"

The CMakeError.log you requested was not too informative:

bash.exe-3.1$ cat CMakeFiles/CMakeError.log
Determining if the C compiler works failed with the following output:


bash.exe-3.1$

i.e., two blank lines.

I just checked download statistics from the mingw SourceForge site for
the gcc-4.7.2 core package alone (not the sum of all gcc-4.7.2-related
packages which, of course, has much larger download statistics) and it
has averaged 20000 downloads (!) a month for the 7 months since its
release.  That's a lot of developers and potential users of CMake on
Windows.  Therefore, it would likely be a good idea to make most
Windows-based generators (such as "NMake Makefiles" and "NMake
Makefiles JOM") work correctly with the MinGW suite of compilers. I am
assuming here this would be a fairly trivial task for a developer who
was familiar with the CMake language-support infrastructure.

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
__________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake.out.gz
Type: application/octet-stream
Size: 824 bytes
Desc: Compressed output from cmake for the combination of MinGW and jom
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20130609/ffcf900e/attachment-0002.obj>


More information about the cmake-developers mailing list