[Cmake] CMake 1.4, NMake makefile, problem with "jump over" to build requ ired lib

Wheeler, Fred (Research) wheeler at crd.ge.com
Wed Jul 31 11:07:09 EDT 2002


I'm having a problem getting VXL to build with CMake-1.4 generated win2k
NMake makefiles in one pass.  In vxl/gel the following directories get
visited in this order (some others are omitted).

vxl/gel/vtol (depends on vdgl)
vxl/gel/vtol/examples (depends on vdgl since vtol depends on vdgl)
vxl/gel/vtol/tests
vxl/gel/vdgl
vxl/gel/vdgl/examples (depends on vtol)
vxl/gel/vdgl/tests

Via TARGET_LINK_LIBRARIES commands, vtol depends on vdgl.lib and
vdgl/examples depends on vtol.  When the build gets to
vxl/gel/vtol/examples, the objects build fine, but the link to make an
executable requires vdgl.lib.  So, cmake "jumps" over to vxl/gel/vdgl
to build vdgl.lib, but this fails.

The NMake makefile file in vxl/gel/vtol uses the following stanza to
build vdgl.lib.

C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl\vdgl$(CMAKE_STATICLIB_SUFFIX):
	cd C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl
	$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends
	$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends
	$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends
	$(MAKE) $(MAKESILENT)
C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl\vdgl$(CMAKE_STATICLIB_SUFFIX)
	cd C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vtol\examples

Note the full path to vdgl.lib.  In my build from scratch I get the
following error,

  ...
  'cmake.check_depends' is up-to-date
  'cmake.depends' is up-to-date
  NMAKE : warning U4010: 'C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl\vdgl.lib' : build
failed; /K specified, continuing ...
  ...

I tried entering the following into a DOS shell.  This is what the
makefile does.  I've substituted for the make variables.

  cd C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl
  nmake /nologo C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl\vdgl.lib
  cd C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vtol\examples

But I get this error,

  NMAKE : fatal error U1073: don't know how to make
'C:\cygwin\home\wsroot\work_vl\vxl_bld_win\gel\vdgl\vdgl.lib'
  Stop.

There is no make target named
"C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl\vdgl.lib", but
there is a target named "vdgl.lib" in gel/vdgl/Makefile.  So, I tried
removing the full path to vdgl.lib and entered this into the DOS
shell,

  cd C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vdgl
  nmake /nologo vdgl.lib
  cd C:\cygwin\home\wsroot\work_vxl\vxl_bld_win\gel\vtol\examples

This built vdgl.lib fine.

Should the NMake makefile stanzas that "jump over" to a different
directory to build a library that is needed use the full path to that
library?

Everything gets built after a second "nmake" command.

Thanks,
Fred Wheeler

--
Fred Wheeler, GE CRD, KWC-303
Phone: 518-387-7225 (GE Internal Dialcom: 8*833-7225)
Fax:   518-387-4042 (GE Internal Dialcom: 8*833-4042)



More information about the CMake mailing list