Skip to content

Fixed CMake toolchain for M1 crossbuilding and moved/completed test - #9011

Merged
memsharded merged 4 commits into
conan-io:developfrom
lasote:feature/fix_m1_cmake_toolchain
May 27, 2021
Merged

memsharded merged 4 commits into
conan-io:developfrom
lasote:feature/fix_m1_cmake_toolchain

Conversation

@lasote

@lasote lasote commented May 27, 2021

Copy link
Copy Markdown
Contributor

Changelog: Fix: The CMakeToolchain now supports Apple M1 cross-building with a profile without environment declared pointing to the system toolchain.
Docs: omit

Moved test (was not testing frameworks) and refactored to test iOS armv8 and Macos armv8 without any trick in the profile.

@lasote
lasote requested a review from memsharded May 27, 2021 10:18
@lasote lasote added this to the 1.37 milestone May 27, 2021
Comment thread conan/tools/cmake/toolchain.py Outdated
cmakelists = textwrap.dedent("""
cmake_minimum_required(VERSION 3.15)
project(MyApp CXX)
set(hello_DIR "${CMAKE_BINARY_DIR}")

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.

Hopefully this hello_DIR should no longer be necessary?

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.

Yes, it is yet necessary to trick CMake (when cross-building on Apple) to search outside the system frameworks dirs.

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.

Ok, lets merge this, and address that in a separate issue.

Comment thread conans/test/functional/toolchains/cmake/test_cmake_toolchain_m1.py Outdated
@memsharded
memsharded merged commit 1ec6548 into conan-io:develop May 27, 2021
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.

2 participants