# Unknown argument --install

**URL:** https://discourse.cmake.org/t/unknown-argument-install/3520
**Category:** Usage
**Created:** [June 7, 2021, 3:01pm UTC](https://discourse.cmake.org/t/unknown-argument-install/3520 "2021-06-07T15:01:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![martijntje](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/838e76/32.png) [@martijntje](https://discourse.cmake.org/u/martijntje)
#### Post date: [June 7, 2021, 3:01pm UTC](https://discourse.cmake.org/t/unknown-argument-install/3520/1 "2021-06-07T15:01:14Z")

</div>

I’m trying to use the `--install` option, that was added in 3.15, because I want to explicitly set component names to be installed. It works on 3.20.1, but on 3.20.3 I get the following error:

`Unknown argument --install`

I have tried both a version compiled from source, as well as the snap. Is this functionality removed? I cannot find a changelog for this.

---

<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: [June 7, 2021, 3:51pm UTC](https://discourse.cmake.org/t/unknown-argument-install/3520/2 "2021-06-07T15:51:50Z")

</div>

It seems that its validity depends on other flags in use at the same time. See [this issue](https://gitlab.kitware.com/cmake/cmake/-/issues/22186). [This MR](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6119) is what actually changed the behavior.

---

<div class="post-metadata">

### Author: ![martijntje](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/838e76/32.png) [@martijntje](https://discourse.cmake.org/u/martijntje)
#### Post date: [June 7, 2021, 5:38pm UTC](https://discourse.cmake.org/t/unknown-argument-install/3520/3 "2021-06-07T17:38:37Z")

</div>

Thanks, now I understand. I was trying to use it like with build, i.e. `cmake --build build --target install`, and then doing `cmake --build build --install --component X`, which indeed is invalid.

It’s good to know this correctly errors out, though I do think the error message could be somewhat clearer.

---

<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: [June 7, 2021, 5:54pm UTC](https://discourse.cmake.org/t/unknown-argument-install/3520/4 "2021-06-07T17:54:55Z")

</div>

I agree. Please file [an issue](https://gitlab.kitware.com/cmake/cmake/-/issues) about that.
