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

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jun 6 20:20:56 EDT 2013


On 2013-06-06 15:35-0700 Alan W. Irwin wrote:

> I have just now tried the "NMake Makefiles JOM" generator for my
> build_projects project, and I ran into a peculiar issue.
>
> For example (from the "jom VERBOSE=1 build_ndiff" output) and with
> single lines split up for e-mail purposes
>
> Z:\home\wine\newstart\cmake-2.8.10.2-win32-x86\bin\cmake.exe -E 
> make_directory
> Z:/home/wine/newstart/build_script/build_dir-git_jom/build_projects/Source/build_ndiff
>
> works fine, but the next command,
>
> Z:\home\wine\newstart\cmake-2.8.10.2-win32-x86\bin\cmake.exe -E copy
> z:/home/software/plplot_svn/HEAD/plplot_allura/cmake/build_projects/ndiff/CMakeLists.txt
> Z:/home/wine/newstart/build_script/build_dir-git_jom/build_projects/Source/build_ndiff/CMakeLists.txt
>
> silently fails to copy the file and the build continues happily a bit
> further until it errors out when that missing file is required.

Never mind.  It appears that jom is unreliable for some reason when run
from bash.  This silent error disappears if I run it from cmd instead.
Anybody understand why?

cmd is really a pretty lame command-line environment when you are used to the power of
bash.  But I held my nose and continued...

Which brings us to the next peculiar "NMake Makefiles JOM" generator
issue.  I could only capture the last part of the output
from running the cmake command, but here is what that said for the
ndiff build
Z:\home\wine\newstart\build_script\build_dir-git_jom>Z:\home\wine\newstart\jom-1.0.13\jom.exe
build_shapelib-configure
[.... lost]

-- The C compiler identification is unknown
-- Check for working C compiler: cl
CMake Warning at CMakeLists.txt:2 (PROJECT):
   To use the JOM generator, cmake must be run from a shell that can use the
   compiler cl from the command line.  This environment does not contain
   INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
   work.


CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: cl -- broken
CMake Error at Z:/home/wine/newstart/cmake-2.8.10.2-win32-x86/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
   The C compiler "cl" is not able to compile a simple test program.

   It fails with the following output:





   CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   CMakeLists.txt:21 (project)


CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
jom: Z:\home\wine\newstart\build_script\build_dir-git_jom\CMakeFiles\build_shapelib-configure.dir\build.make [build_projects\Stamp\build_sha
pelib\build_shapelib-configure] Error 1
jom: Z:\home\wine\newstart\build_script\build_dir-git_jom\CMakeFiles\Makefile2 [CMakeFiles\build_shapelib-configure.dir\all] Error 2
jom: Z:\home\wine\newstart\build_script\build_dir-git_jom\CMakeFiles\Makefile2 [CMakeFiles\build_shapelib-configure.dir\rule] Error 2
jom: Z:\home\wine\newstart\build_script\build_dir-git_jom\Makefile [build_shapelib-configure] Error 2

Z:\home\wine\newstart\build_script\build_dir-git_jom>

The MinGW suite of compilers is on the PATH.  Why doesn't cmake -G
"NMake Makefiles JOM" find those automatically?

I will attempt to follow the advice to set CMAKE_C_COMPILER to gcc 
out of curiosity to see if I can eventually make this work, but my
initial impressions of "NMake Makefiles JOM" are not good due to this
CMake issue with the default compiler choice for this generator
and also jom's silent unreliability when it is run from bash rather
than the cmd shell.

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-developers mailing list