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

vc: add v1.4.5 #22064

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

vc: add v1.4.5 #22064

wants to merge 4 commits into from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Dec 29, 2023

Also replaced automatic CPU SIMD feature handling with an explicit architecture option to fix incompatibility with Apple Silicon x86.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Feb 7, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 7, 2024
@conan-center-bot conan-center-bot added Bump version PR bumping version without recipe modifications and removed stale labels May 26, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot conan-center-bot removed Failed Bump version PR bumping version without recipe modifications labels May 26, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@perseoGI
Copy link
Contributor

perseoGI commented Jul 3, 2024

Hi @valgur, there is a new release! https://github.com/VcDevel/Vc/releases/tag/1.4.5
Could you please update the PR?
Thank you in advance!

@perseoGI perseoGI self-assigned this Jul 3, 2024
@valgur valgur changed the title vc: add v1.4.4 vc: add v1.4.5 Jul 3, 2024
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 4 (3321ba9b7e4d7dea00df729db61a5734035e2a92):

  • vc/1.4.2:
    All packages built successfully! (All logs)

  • vc/1.4.3:
    All packages built successfully! (All logs)

  • vc/1.4.1:
    All packages built successfully! (All logs)

  • vc/1.4.5:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 4 (3321ba9b7e4d7dea00df729db61a5734035e2a92):

  • vc/1.4.3:
    All packages built successfully! (All logs)

  • vc/1.4.2:
    All packages built successfully! (All logs)

  • vc/1.4.1:
    All packages built successfully! (All logs)

  • vc/1.4.5:
    All packages built successfully! (All logs)

Comment on lines +23 to +32
"cpu_architecture": [
"auto", "generic", "none", "x86-64", "x86-64-v2", "x86-64-v3", "x86-64-v4",
# Intel
"core", "merom", "penryn", "nehalem", "westmere", "sandy-bridge", "ivy-bridge", "haswell",
"broadwell", "skylake", "skylake-xeon", "kaby-lake", "cannonlake", "silvermont", "goldmont",
"knl", "atom",
# AMD
"k8", "k8-sse3", "barcelona", "istanbul", "magny-cours", "bulldozer", "interlagos",
"piledriver", "AMD 14h", "AMD 16h", "zen", "zen3"
],
Copy link
Member

Choose a reason for hiding this comment

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

Could this not be detected from the host profile? Wouldn't that make a bit more sense? It might not be possible but just thinking out loud

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, that's a very good point. Not with the current settings, but this could well be a separate arch.microarchitecture or something similar. It could even set the appropriate -march=... automatically, probably.
Many projects provide an option to set -march=native, but this always gets disabled by package managers to build for the lowest common denominator. This is a place where the precise host profile capabilities of Conan could really shine.
Also, duplicating these options across packages is not ideal either. I applied the exact same logic in the OpenMVG recipe as well: #23836.

@perseoGI perseoGI mentioned this pull request Jul 26, 2024
3 tasks
Comment on lines +61 to +62
tc.variables["TARGET_ARCHITECTURE"] = self.options.get_safe("cpu_architecture", "none")
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW"
Copy link
Contributor

Choose a reason for hiding this comment

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

Modifying tc.variables directly is only recommended for very special cases, prefer modifying directly cache_variables, removing the need of CMAKE_POLICY_DEFAULT_CMP0077 usage

Suggested change
tc.variables["TARGET_ARCHITECTURE"] = self.options.get_safe("cpu_architecture", "none")
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW"
tc.cache_variables["TARGET_ARCHITECTURE"] = self.options.get_safe("cpu_architecture", "none")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've seen discussions on whether variables/cache_variables on the CCI and Conan client repo before and they have not favored either too strongly, afaik. Has there been an offline discussion and a decision made regarding this? I would not mind using cache_variables, but the switch would be applicable to nearly all other open PRs as well.

I've personally preferred variables as using the values via a toolchain file is more flexible and convenient than providing them via a CMake preset. Not that it matters as much in CCI recipes, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Using cache variables as a default approach is what we recommend in the documentation since Nov 2022: https://docs.conan.io/2/reference/tools/cmake/cmaketoolchain.html#variables

tc.variables should be reserved for things that "belong in a toolchain file" - for that, I would refer users to CMake's documentation as to which variables belong in a CMake toolchain file. The recommendation we are following also comes from Craig Scott's book (https://crascit.com/professional-cmake/) - where it is recommended for toolchain files to define as few variables as possible as a general rule.

There was never an internal discussion - this was the conclusion of this issue reported here: conan-io/conan#11937 - which is detailed and discussed in the open. The conclusion was that unless it's a variable CMake expects to be defined in a toolchain file, passing it as a cache_variable is less likely to cause any issues.
We hope that the conclusion of that issue and the Conan documentation which are clear in this regard, are enough to clarify this - but if could be expressed better, please let us know.

As for other recipes having it - a lot of recipes used tc.variables before there was a clarification - in a lot of cases it works without issues too, and it's not particularly worth the time changing them unless they do cause issues.
For open PRs, we'll keep an eye out and ensure consistency - what caught our eye in this case was having to enable a policy alongside the tc.variables definition.

@perseoGI perseoGI mentioned this pull request Aug 1, 2024
3 tasks
@perseoGI perseoGI removed their assignment Dec 9, 2024
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.

4 participants