Unknown argument --install

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.

It seems that its validity depends on other flags in use at the same time. See this issue. This MR is what actually changed the behavior.

1 Like

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.

I agree. Please file an issue about that.