Add CROSSCOMPILE_MACHINENAME environment variable for CMake that

will allow the host machine type detection to be skipped and
the target MACHINENAME to be manually defined.
This commit is contained in:
Nicholas J. Kain 2015-02-12 13:35:50 -05:00
parent 8e4ea0be72
commit b792162113

View File

@ -120,12 +120,17 @@ else()
message("Could not detect glibc version.")
endif()
if ("$ENV{CROSSCOMPILE_MACHINENAME}" STREQUAL "")
execute_process(
COMMAND uname -m
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE MACHINENAME
)
else()
message("skipped machine detection; MACHINENAME is '$ENV{CROSSCOMPILE_MACHINENAME}'")
set(MACHINENAME $ENV{CROSSCOMPILE_MACHINENAME})
endif()
if (${MACHINENAME} STREQUAL "x86_64")
message("Detected that the current host is x86_64. Enabling seccomp-filter.")