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

Documented cmaketoolchain:extra_variables (#16229) #3719

Merged
merged 7 commits into from
Jun 5, 2024

Conversation

perseoGI
Copy link
Contributor

@perseoGI perseoGI commented May 9, 2024

Added documentation for new cmaketoolchain option extra_variables
Refers to: conan-io/conan#16242

@perseoGI perseoGI requested a review from jcar87 May 9, 2024 11:23
@CLAassistant
Copy link

CLAassistant commented May 9, 2024

CLA assistant check
All committers have signed the CLA.

@perseoGI perseoGI changed the title Documented cmaketoolchain:generator_instance (#16229) Documented cmaketoolchain:extra_variables (#16229) May 16, 2024

conan install . -c "tools.cmake.cmaketoolchain:extra_variables*={'CMAKE_GENERATOR_INSTANCE': 'C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/'}"

.. tip::
Copy link
Member

Choose a reason for hiding this comment

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

TIL! Can I get a pic of how this looks when built?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
It looks good to me, but maybe it is not what we want.
As a noobie, I like command examples so that's why I added it. And also the *= looks very important because really nobody read the docs xD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Final result
image

@perseoGI perseoGI force-pushed the perseoGI/16222-feature-cmake_generator_instance branch from bcbb681 to 280a069 Compare May 21, 2024 11:52
@perseoGI perseoGI force-pushed the perseoGI/16222-feature-cmake_generator_instance branch from 280a069 to 5e626a8 Compare May 23, 2024 10:08
reference/tools/cmake/cmaketoolchain.rst Outdated Show resolved Hide resolved
reference/tools/cmake/cmaketoolchain.rst Outdated Show resolved Hide resolved
@czoido czoido added this to the 2.4.0 milestone Jun 4, 2024
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

The dict is not very readable or didactical. I think an incremental approach, starting with a single {"MYCMAKEVAR": "Myvalue"} is better:

  • Simple complete use case of the extra_variables
  • Use something better than STR because that seems a type, not a variable name.
  • Single line that fits in the screen

Then explain the .cmake generated from it, and explain clearly that it is injected later so it can overwrite.

Then, finally, explain the advanced syntax, with the whole dict with the type, cache and docstring.

Co-authored-by: Rubén Rincón Blanco <rubenrb@jfrog.com>
@czoido czoido merged commit d8bbe7f into develop2 Jun 5, 2024
3 checks passed
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

Much better, thanks!

@memsharded memsharded deleted the perseoGI/16222-feature-cmake_generator_instance branch June 5, 2024 11:00
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.

None yet

6 participants