summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/cmake
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-10-11 13:30:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-15 10:01:42 +0100
commit4e1b9d590246d29a4ae49f421b2ef0cfdbad5dd1 (patch)
tree40596645dcdc14c5dc103ac68e61e3851544c82c /meta/recipes-devtools/cmake
parent62a01634c59e476f14ce21b64349642073c90356 (diff)
downloadpoky-4e1b9d590246d29a4ae49f421b2ef0cfdbad5dd1.tar.gz
cmake: improve CMAKE_SYSTEM_PROCESSOR assignment in nativesdk
The previous string manipulations would result in the wrong string being used for machines such as intel-corei7-64 as the sysroot was split at the first hyphen (so would result in corei7 instead of corei7-64). Change the logic so that it looks for processor-distro-os and uses the whole of the processor field. (From OE-Core rev: ce24958d644f2218d5415be574a5b7e1ee8c9b2d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/cmake')
-rw-r--r--meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 0ce6573818..6518408c70 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -10,8 +10,10 @@ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
10set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) 10set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
11set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) 11set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
12 12
13string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT}) 13# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os).
14string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) 14if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+")
15 set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1})
16endif()
15 17
16# Include the toolchain configuration subscripts 18# Include the toolchain configuration subscripts
17file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) 19file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )