Skip to content

cmake: Avoid try_run when cross-compiling #261

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

Merged
merged 1 commit into from
Nov 14, 2020
Merged

cmake: Avoid try_run when cross-compiling #261

merged 1 commit into from
Nov 14, 2020

Conversation

ew1abz
Copy link
Contributor

@ew1abz ew1abz commented Mar 30, 2020

Cmake can't run and test a binary compiled for a different architecture. Use try_compile instead of try_run in case if architectures are different.

Tested on

  • Linux x86_64 (host = target)
  • Linux armv7l (host = target)
  • Linux cortexa7t2hf-neon-vfpv4-openstlinux_weston (cross-compilation)

@dj1an
Copy link

dj1an commented Apr 28, 2020

Thanks!
I Also got this error. This PR fixed it.
Linux X86_64 host, crosscompile to armv7l

@wb2osz wb2osz merged commit 791982a into wb2osz:dev Nov 14, 2020
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