# parallel build with ctest

**URL:** https://discourse.cmake.org/t/parallel-build-with-ctest/7045
**Category:** Usage
**Created:** [December 11, 2022, 5:05pm UTC](https://discourse.cmake.org/t/parallel-build-with-ctest/7045 "2022-12-11T17:05:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Fabian188](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fabian188/32/2934_2.png) [@Fabian188](https://discourse.cmake.org/u/Fabian188)
#### Post date: [December 11, 2022, 5:05pm UTC](https://discourse.cmake.org/t/parallel-build-with-ctest/7045/1 "2022-12-11T17:05:29Z")

</div>

We use for our build pipeline ctest (on Linux using make)

`ctest -D ExperimentalBuild --track $CDASH_TRACK -V`

Is there a way to run it in parallel (make -j)?

I only found this 15 years old answer and wonder if there isn’t something updated?  
[https://cmake.cmake.narkive.com/gdoNKfPn/parallel-builds-for-ctest](https://cmake.cmake.narkive.com/gdoNKfPn/parallel-builds-for-ctest)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 12, 2022, 5:22pm UTC](https://discourse.cmake.org/t/parallel-build-with-ctest/7045/2 "2022-12-12T17:22:19Z")

</div>

The `ctest -D` command line interface is probably not the most flexible these days as many new features that have been added are missing. I would suggest using a `ctest -S` script where you can use `ctest_build(PARALLEL_LEVEL)`.

---

<div class="post-metadata">

### Author: ![Fabian188](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fabian188/32/2934_2.png) [@Fabian188](https://discourse.cmake.org/u/Fabian188)
#### Post date: [December 13, 2022, 2:55pm UTC](https://discourse.cmake.org/t/parallel-build-with-ctest/7045/3 "2022-12-13T14:55:46Z")

</div>

Thanks for the hint. I’ll go this way.
