Skip to content

CMake architecture selection utility - #1413

Merged
JohanMabille merged 21 commits into
xtensor-stack:masterfrom
AntoinePrv:cmake-architectures
Sep 22, 2026
Merged

JohanMabille merged 21 commits into
xtensor-stack:masterfrom
AntoinePrv:cmake-architectures

Conversation

@AntoinePrv

Copy link
Copy Markdown
Contributor

Add CMake file with xsimd_target_set_arch to easily select compile to the matching xsimd achitecture.
It's a free function that can be reused in downstream projects, reducing CMake boilerplate.

It's also a replacement to #1348, CMakePresets.json being unflexible and suffering from combinatorial explosion.
eg. -DTARGET_ARCH=avx-128 is enough to make sure we don't build on a higher architecture locally, and to set the default architecture the smaller size avx-128.

@AntoinePrv
AntoinePrv marked this pull request as ready for review September 16, 2026 07:54

@serge-sans-paille serge-sans-paille left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot for the hard work. this is a big step forward in making our CI and cmake files easier to maintain.

Please squash all commits and we're good!

@JohanMabille
JohanMabille merged commit 210af9f into xtensor-stack:master Sep 22, 2026
88 checks passed
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