Private
Public Access
2
0

arch: initial framework for supporting other architectures added.

x86: all platforms moved into x86 directory

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-11-21 00:01:08 +00:00
parent aff88114e5
commit b0a21e2c30
11 changed files with 129 additions and 62 deletions

View File

@@ -56,6 +56,19 @@ option (BUILDSWIGPYTHON "Build swig python modules." ON)
option (BUILDSWIGNODE "Build swig node modules." ON)
option (IPK "Generate IPK using CPack" OFF)
include (TargetArch)
target_architecture (DETECTED_ARCH)
message( INFO " - Target arch is ${DETECTED_ARCH}")
if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64"
OR DETECTED_ARCH STREQUAL "i386")
set (X86PLAT ON)
elseif (DETECTED_ARCH MATCHES "arm.*")
set (ARMPLAT ON)
else ()
message(FATAL_ERROR "Only x86 and arm platforms currently supported")
endif()
if (GTEST)
enable_testing ()
add_subdirectory (tests)
@@ -75,10 +88,6 @@ if (BUILDDOC)
endif ()
if (IPK)
include (TargetArch)
target_architecture (DETECTED_ARCH)
message( INFO " - Target arch is ${DETECTED_ARCH}")
set(CPACK_GENERATOR "DEB" "TGZ")
set(OPKG_ARCH ${DETECTED_ARCH})
set(CPACK_BINARY_DIR ${CMAKE_BINARY_DIR})