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

Set CMAKE_CROSSCOMPILING and CMAKE_SYSTEM_NAME when cross compiling with cmake #25477

Closed
expipiplus1 opened this issue May 3, 2017 · 3 comments
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on
Milestone

Comments

@expipiplus1
Copy link
Contributor

Issue description

CMAKE_CROSSCOMPILING is not set when a cross compile is in progress.

https://cmake.org/cmake/help/v3.0/variable/CMAKE_CROSSCOMPILING.html

This is necessary for several packages, such as LLVM, to cross compile correctly.

When buildPlatform != hostPlatform the additional cmake argument -DCMAKE_CROSSCOMPILING=True should be used

@aneeshusa
Copy link
Contributor

@Ericson2314 mentioned this may be more elegant with NixOS/rfcs#13.

@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label May 18, 2017
@Ericson2314 Ericson2314 modified the milestone: 17.09 Jun 25, 2017
@matthewbauer matthewbauer modified the milestones: 17.09, 18.09 Apr 17, 2018
@matthewbauer matthewbauer modified the milestones: 18.09, 19.03 Oct 1, 2018
@matthewbauer
Copy link
Member

Okay closing #47192 in favor of this one.

@Ericson2314 Ericson2314 changed the title Set CMAKE_CROSSCOMPILING when cross compiling with cmake Set CMAKE_CROSSCOMPILING and CMAKE_SYSTEM_NAME when cross compiling with cmake Oct 1, 2018
@expipiplus1
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on
Projects
None yet
Development

No branches or pull requests

4 participants