# cmake --install and passing -j arg

**URL:** https://discourse.cmake.org/t/cmake-install-and-passing-j-arg/11310
**Category:** Usage
**Tags:** os:linux, gen:makefiles, gen:ninja
**Created:** [July 23, 2024, 3:58pm UTC](https://discourse.cmake.org/t/cmake-install-and-passing-j-arg/11310 "2024-07-23T15:58:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jsykes15](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/c77e96/32.png) [@jsykes15](https://discourse.cmake.org/u/jsykes15)
#### Post date: [July 23, 2024, 3:58pm UTC](https://discourse.cmake.org/t/cmake-install-and-passing-j-arg/11310/1 "2024-07-23T15:58:13Z")

</div>

The following command works in 3.20:  
`cmake --install . -prefix <path> -- -j8`  
but in 3.30 it results in:  
`Unknown argument --`

The documentation for the `cmake --install` command in both 3.20 and the latest 3.30 don’t say that `--` is supported; though it is for the `--build` command. I assume it was either working as undocumented behavior in 3.20 or was being silently ignored.  
This [issue](https://discourse.cmake.org/t/cmake-job/5081/2) said that `-j` or `--parallel` option is available for `--install` which would be an alternative the for specific case of wanting to pass `-j` but that doesn’t seem to be true and there is nothing present in the documentation for this either.

Is there a way to run the equivalent of `[make|ninja] install -j8` through the cmake --install command so it isn’t generator dependent? Whilst following the make [convention](https://www.gnu.org/software/make/manual/make.html#Directory-Variables) of:

> Running ‘make install’ with a different value of `prefix` from the one used to build the program should _not_ recompile the program.

---

<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: [July 18, 2025, 8:28pm UTC](https://discourse.cmake.org/t/cmake-install-and-passing-j-arg/11310/2 "2025-07-18T20:28:32Z")

</div>

Seems like a command line parsing change. @robert.maynard?

---

<div class="post-metadata">

### Author: ![vito.gamberini](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vito.gamberini/32/4376_2.png) [@vito.gamberini](https://discourse.cmake.org/u/vito.gamberini)
#### Post date: [July 19, 2025, 2:03pm UTC](https://discourse.cmake.org/t/cmake-install-and-passing-j-arg/11310/3 "2025-07-19T14:03:28Z")

</div>

I haven’t double checked but prior to 3.30 I think it was ignored completely.

To use parallel installs now, a project [needs to opt-in via the `INSTALL_PARALLEL` global property.](https://cmake.org/cmake/help/latest/prop_gbl/INSTALL_PARALLEL.html) In CMake \>= 3.31 that should enable using `-j` with `cmake --install`.

---

<div class="post-metadata">

### Author: ![jsykes15](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/c77e96/32.png) [@jsykes15](https://discourse.cmake.org/u/jsykes15)
#### Post date: [July 22, 2025, 9:16am UTC](https://discourse.cmake.org/t/cmake-install-and-passing-j-arg/11310/4 "2025-07-22T09:16:23Z")

</div>

Thanks - I’ll give this a try and report back
