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

Bill Hoffman bill.hoffman at kitware.com
Wed Jul 31 12:49:50 EDT 2002


I agree with Jim, the order of your SUBDIRS seems to be wrong.
In VTK, we build all the libraries, then jump to the Examples and Testing.

However, you have found a bug.   If the LIBRARY_OUTPUT_PATH is not set,
the jump to build does not work.   Did this work in CMake 1.2?

-Bill


At 11:44 AM 7/31/2002 -0400, Miller, James V (Research) wrote:
>Aren't subdirectories visited in the order in which the SUBDIRS
>command are listed?
>
>Actually, from your email is looks like there is a circular dependency
>on directories
>
>vtol depends of vdgl
>vdgl/examples depends on vtol
>
>The answer may be to move the vdgl/examples that depend on vtol into
>the vtol/examples directory.  Then make sure the vdgl is listed before
>vtol in the SUBDIRS commands.
>
>
>-----Original Message-----
>From: Wheeler, Fred (Research) 
>Sent: Wednesday, July 31, 2002 11:07 AM
>To: CMake List (E-mail)
>Subject: [Cmake] CMake 1.4, NMake makefile, problem with "jump over" to
>build requ ired lib
>
>
>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)
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 




More information about the CMake mailing list