Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --conf arguments for conan install command. #445

Merged
merged 5 commits into from
Oct 26, 2022

Conversation

hwhsu1231
Copy link
Contributor

Add the following arguments of conan install command:

  • --conf
  • --conf:host
  • --conf:build

for conan_cmake_install() function.

@CLAassistant
Copy link

CLAassistant commented Sep 17, 2022

CLA assistant check
All committers have signed the CLA.

@hwhsu1231
Copy link
Contributor Author

Hello @memsharded or @czoido,

Recently, I found an ALTERNATIVE way to use cmake-conan, which can successfully use CMakeToolchain generator. However, I met a problem which need to add the following argument in conan install command:

--conf tools.cmake.cmaketoolchain:generator="Ninja Multi-Config"

Therefore, I posted this PR to add CONF, CONF_HOST, and CONF_BUILD arguments for conan_cmake_install() function. Can you check whether this PR can be merged? Thanks a lot!

@czoido czoido self-assigned this Sep 19, 2022
@czoido
Copy link
Contributor

czoido commented Sep 19, 2022

Hi @hwhsu1231,
Thanks a lot for contributing this, it's looking good, let's check if the ci passes. Did you tests it locally? Adding at least one test would be nice.

@czoido czoido added this to the 0.19 milestone Sep 19, 2022
@hwhsu1231
Copy link
Contributor Author

Yes. I prepared a modified conan.cmake locally and copied it to the build directory instead of downloading from the repository. And it worked as I expected.

image

@hwhsu1231
Copy link
Contributor Author

@czoido Execuse me. What do you mean "Adding at least one test would be nice."? Where do I need to add the test? What kind of test should I add?

@czoido
Copy link
Contributor

czoido commented Sep 19, 2022

@czoido Execuse me. What do you mean "Adding at least one test would be nice."? Where do I need to add the test? What kind of test should I add?

I meant adding it here: https://github.com/conan-io/cmake-conan/blob/develop/tests.py but don't worry about that, I'll update the branch with a test.

@hwhsu1231
Copy link
Contributor Author

@czoido Recently, I'm trying an alternatvie way to use cmake-conan. And this argument --conf is necessary for CMakeToolchain to generate a proper conan_toolchain.cmake. Hope this PR can be merged as soon as possible.

@czoido
Copy link
Contributor

czoido commented Oct 26, 2022

Hi @hwhsu1231,
I have just pushed a test for this feature, it will be merged for 0.19 release as soon as the ci passes.

@czoido czoido merged commit 8c8766f into conan-io:develop Oct 26, 2022
@hwhsu1231 hwhsu1231 deleted the add-conf-arg-for-install-cmd branch October 26, 2022 10:43
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.

3 participants