On Tue, 2013-08-13 at 00:24 +0200, Eric Noulard wrote:
> > OK, maybe I'm misunderstanding but if the SerializeTarget is considered
> > "always out of date" because it was defined with add_custom_target()
> > then won't that cause the two libraries to always rebuild, since
> > something they depend on is always out of date?  Maybe I'm thinking of
> > it too much like make.
> 
> This is puzzling but as far as I understand it, since SerializeTarget
> has no output it cannot trigger the rebuilt of a target (nioether Lib1
> nor Lib2), however whenever you need (or ask) to build Lib1 or Lib2
> then SerializeTarget has to be executed and consequently the
> add_custom_command will be if the "generated.c" file is out of date.

OK, I was thinking it was like a .PHONY rule in make, but it looks like
it's rather just like a normal empty rule (if it has no commands).  That
works.  Thanks!

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to