On 2013-01-23 23:52, Alan W. Irwin wrote:
Whether ordinary or custom targets can be built in parallel depends on
the back-end being used. For the "Unix Makefiles" generator it is
simple;
make -j8 test_everything
With the Ninja generator it is even easier; 'ninja [<target>]' :-). (You
can also give -jN, but ninja defaults to parallel, with N = cores + 2.
Also, I think it may be able to do even better parallelization since it
is not based on recursive build rules, and knows about the entire build
graph.)
On 2013-01-23 19:07-0500 Matthew Woehlke wrote:
different generators may or may not have the concept of targets in
directories. I think you would need to create a uniquely named
targetper directory.
@Matthew: That should not be a concern. Targets are a global concept
in CMake so are independent of which subdirectory they are created in.
Right; *global* targets are easy and the default. I had read Wojciech's
original question as wanting per-directory targets, which I think the
only sane way to accomplish is with a uniquely named target per
directory. (What I'm not sure about is what would happen if you tried to
create a target with the same name per directory. It *might* work with
make, but definitely won't do what you want/expect, if it works at all,
with other generators. Ergo, what I was trying to say is that I would
recommend against doing such a thing.)
--
Matthew
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake