Alan,

I think I now have a working, if not elegant, solution.

> I am a little concerned about the coincidence in names between your
> custom command OUTPUT file and your custom target.  That would have 
> caused a problem for 2.4.4 with exactly the symptoms you see (nothing 
> happens), but that bug has apparently been fixed in 2.4.5.  Just to 
> be sure, though, you should temporarily rename your custom target 
> plplot.jar to something else.

This appeared to make no difference - I'm guessing that the fact one
target was plplot.jar and one was
${CMAKE_CURRENT_BINARY_DIR}/plplot.jar was the reason. I agree it is
dangerous though so I've changed it.

> How about solving this by creating the jar file every time (by
> dropping the custom command with the OUTPUT plplot.jar and putting 
> the equivalent commands in the plplot.jar target)?  My impression 
> is that creating jar files is a fast process so the user probably 
> wouldn't even notice the extra time this would take.
>
> Also, before going too much further with this you should see whether
> cross-directory file DEPENDS actually work.  When I was just starting
> to work with cmake, I could never get that to work, but it may have
> been my inexperience or a bug in the earlier version of cmake.  On 
> the other hand, cmake may just not allow cross-directory file 
> DEPENDS in which case we are back to the solution I proposed 
> above to create the jar file every time you run make.
> 
> I have some suggestions on alternatives for creating cross-directory
> DEPENDS file lists, but depending on your response to the questions 
> and comments above we may not need them.

Investigation showed that cross-directory depends do work, at least in
this case. I have manually added the list of .class files from
plplot/core to the DEPENDS for ${CMAKE_CURRENT_BINARY_DIR}/plplot.jar
and this appears to correctly rebuild. 

Not the prettiest solution, but it works, and no need to rebuild the
.jar file every time.

Andrew

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to