Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] Re: Re: Re: Re: Re: How does manta.py get generated?


Chronological Thread 
  • From: "James Bigler" < >
  • To:
  • Subject: [Manta] Re: Re: Re: Re: Re: How does manta.py get generated?
  • Date: Wed, 29 Oct 2008 14:59:50 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=UflSo6FKtpR61k+nXfzBisqoPw1ydonNvS2h8aFts52cDqIstQV3KROxWlFVF7Gfeu ovNvrG4pyIrDeimJI+0piH9Bv3xbKP7XnOMVCLO1DRWDSkLz1zjzR1NIt10hFdCkMpVZ ehvAWh+ySpO1XDgFwFWnwXLLujm/R/lk40j48=

I think the issue is that CMake doesn't know that lib/manta.py is an output of a command.  Because of this, CMake doesn't know that it needs to be generated.  To CMake, lib/manta.py is a byproduct of building some other file.

Looking at the add_custom_command in MantaUseSwig.cmake, indeed this is the case:


  ADD_CUSTOM_COMMAND(
    OUTPUT ${swig_generated_file_fullname}
    ...
    )

So, in order to do the Right Thing (TM), the MantaUseSwig.cmake code needs to figure out *all* the output files from the above swig command and add them to the output list.  This way CMake will know they are output targets and rebuild them if they disappear.

There is some commented out code that prints out what swig_generated_file_fullname is.  Uncomment that to see what CMake thinks is the output of this command.

James

On Wed, Oct 29, 2008 at 2:20 PM, Abe Stephens < "> > wrote:
I might have missed the beginning of this thread, but I think that lib/manta.py is properly rebuilt when a change is made in the corresponding swig .i file or to a header--is this not happening?

It might be possible to add the file as a dependency to the swig library target explicitly in one of the swig related macros in CMake/ using add_dependency(...) or in the "DEPENDS" block of a subsequent custom_command. It should also be listed as an "OUTPUT" of the custom command which creates it...

Abe

On Oct 29, 2008, at 2:03 PM, J. Davison de St. Germain wrote:

Thanks Abe!  "make clean" was definitely not the route I wanted to go.  Now, the next step is, do you know how to add a dependency to the (c)make system that will rebuild lib/manta.py as needed?  Any pointers on this would be most appreciated.

   Thanks,
         Dav

Abe Stephens wrote:
Removing the SwigInterface/mantaPYTHON_wrap.cxx* from the build directory, might be faster than a make clean.

Abe

On Oct 28, 2008, at 1:52 PM, James Bigler wrote:

It should be built in SwigInterface/CMakeLists.txt.  It gets copied to lib as a post build step, so there isn't an explicit rule to build it.  Copying gets done after manta.py is created.  You should poke around your build directory for the other manta.py file and copy it by hand.

James

On Tue, Oct 28, 2008 at 1:45 PM, J. Davison de St. Germain < " target="_blank"> > wrote:
Hi,

 If I blow away lib/manta.py, it never comes back... Can someone tell me how to get it back, and where in the cmake system it is generated?

  Thanks,
     Dav

--
-----------------------------------------------------------------------
- J. Davison de St. Germain         " target="_blank">    (801) 581-4078 -
- Chief Software Engineer           http://www.cs.utah.edu/~dav       -
- SCI Institute, SE C-SAFE          University of Utah                -
-----------------------------------------------------------------------




-- 
-----------------------------------------------------------------------
- J. Davison de St. Germain         
 
 " target="_blank">
     (801) 581-4078 -
- Chief Software Engineer           http://www.cs.utah.edu/~dav       -
- SCI Institute, SE C-SAFE          University of Utah                -
-----------------------------------------------------------------------





Archive powered by MHonArc 2.6.16.

Top of page