<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-06-27 13:32 GMT+02:00 Damian Dixon <span dir="ltr"><<a href="mailto:damian.dixon@gmail.com" target="_blank">damian.dixon@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:trebuchet ms,sans-serif">Hi,</div><div style="font-family:trebuchet ms,sans-serif"><br></div><div style="font-family:trebuchet ms,sans-serif">Is there anyway to build tests in parallel when using ctest?</div></div></blockquote><div><br></div><div>I'm not sure to understand.</div><div>Do you want to **build** test in parallel or **run** test in parallel?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:trebuchet ms,sans-serif"><br></div><div style="font-family:trebuchet ms,sans-serif">I am generating makefiles on Linux.</div></div></blockquote><div><br></div><div>Then</div><div><br></div><div>$ make -j 8 </div><div><br></div><div>should build in parallel.</div><div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:trebuchet ms,sans-serif"><br></div><div style="font-family:trebuchet ms,sans-serif">Part of the reason I am asking this is that if I pre-build the test for some unknown reason ctest rebuilds the source files.</div></div></blockquote><div><br></div><div>Then you have to verify your test dependencies. ctest should only run the tests not build then unless you call ctest</div><div>with --build-xxx option.</div><div><br></div><div>How are you calling ctest?</div><div><br></div><div>ctest --parallel 8 </div><div>or</div><div>ctest -j 8</div><div><br></div><div>should run tests in parallel.</div><div><br></div><div>This works for me (either parallel build or parallel test run) but I'm using ninja.</div><div><br></div><div><br></div><div>Could you give us more detail on how you run cmake, make and ctest ?</div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>