Skip to content

cmake: add support for cli_args in install() - #14397

Merged
memsharded merged 1 commit into
conan-io:release/2.0from
mkmkme:mkmkme/cmake-install-args
Jul 30, 2023
Merged

memsharded merged 1 commit into
conan-io:release/2.0from
mkmkme:mkmkme/cmake-install-args

Conversation

@mkmkme

@mkmkme mkmkme commented Jul 30, 2023

Copy link
Copy Markdown
Contributor

This commit fixes #14235

Changelog: Feature: Add cli_args argument for CMake.install().
Docs: conan-io/docs#3314

  • Refer to the issue that supports this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just one minor comment about the warning

Comment thread conan/tools/cmake/cmake.py Outdated
if cli_args:
if "--install" in cli_args:
raise ConanException("Do not pass '--install' argument to 'install()'")
if "--strip" in cli_args:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this warning, it should either be normally allowed or raise an error, but from my experience this kind of warning doesn't help much as it pass unnoticed, or it annoys the user that actually wants to do that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure :) The rationale for that warning was that I wanted the user to be aware of that feature. It wasn't even documented, and I got to know about it myself while reading the code.

I removed the warning. The configuration mentioning in the docs is added separately at conan-io/docs#3314

@memsharded memsharded added this to the 2.0.10 milestone Jul 30, 2023
@mkmkme
mkmkme force-pushed the mkmkme/cmake-install-args branch from 1dbcd35 to f683d91 Compare July 30, 2023 11:51
@memsharded
memsharded merged commit c21df11 into conan-io:release/2.0 Jul 30, 2023
@mkmkme
mkmkme deleted the mkmkme/cmake-install-args branch July 31, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cli_args argument to cmake.install()

2 participants