Cmake: add override BUILDARCH for selecting arch
Stops TargetArch module for running and finding the arch Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -57,10 +57,16 @@ option (BUILDSWIGNODE "Build swig node modules." ON)
|
|||||||
option (IPK "Generate IPK using CPack" OFF)
|
option (IPK "Generate IPK using CPack" OFF)
|
||||||
option (BUILDPYTHON3 "Use python3 for building/installing" OFF)
|
option (BUILDPYTHON3 "Use python3 for building/installing" OFF)
|
||||||
option (INSTALLGPIOTOOL "Install gpio tool" OFF)
|
option (INSTALLGPIOTOOL "Install gpio tool" OFF)
|
||||||
|
option (BUILDARCH "Override architecture to build for - override" OFF)
|
||||||
|
|
||||||
include (TargetArch)
|
if (NOT BUILDARCH)
|
||||||
target_architecture (DETECTED_ARCH)
|
include (TargetArch)
|
||||||
message( INFO " - Target arch is ${DETECTED_ARCH}")
|
target_architecture (DETECTED_ARCH)
|
||||||
|
message( INFO " - Target arch is ${DETECTED_ARCH}")
|
||||||
|
else ()
|
||||||
|
set (DETECTED_ARCH ${BUILDARCH})
|
||||||
|
message( INFO " - Override arch is ${DETECTED_ARCH}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64"
|
if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64"
|
||||||
OR DETECTED_ARCH STREQUAL "i386")
|
OR DETECTED_ARCH STREQUAL "i386")
|
||||||
|
|||||||
Reference in New Issue
Block a user