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

cmake: treat building for another ISA as a cross-compile. #1220

Commits on Sep 20, 2024

  1. cmake: treat building for another ISA as a cross-compile.

    CMake appears to have the notion that a build is only a cross-compile if
    the targt *operating system* is different.  This is an incorrect notion,
    as even if the target is the *same* OS but a different instruction set,
    you may not be able to do tests that involve compiling and running a
    program.
    
    Check whether CMAKE_GENERATOR_PLATFORM is set and has a value different
    from that of CMAKE_HOST_SYSTEM_PROCESSOR and, if that's the case, set
    CMAKE_CROSSCOMPILING to TRUE.
    
    This comes from libpcap, where the equivalent change fixed issue
    the-tcpdump-group/libpcap#1352.
    
    (A different strategy may be necessary for cross-builds with UNIX
    toolchains.)
    guyharris committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    ccde4f7 View commit details
    Browse the repository at this point in the history