Skip to content

Commit

Permalink
cmake: Use a regular expression to match x86 architectures
Browse files Browse the repository at this point in the history
in OE we use i686 for qemux86 and this results in

-- INFO - Target arch is i686
CMake Error at CMakeLists.txt:191 (message):
  Only x86, arm, mips, PERIPHERALMAN and mock platforms currently supported

So using a wildcard helps in using any x86 arch

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj authored and tingleby committed Jan 23, 2024
1 parent 3268f4a commit 9e94fd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ else ()
message (STATUS "INFO - Override arch is ${DETECTED_ARCH}")
endif()

if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64"
OR DETECTED_ARCH STREQUAL "i386")
if (DETECTED_ARCH MATCHES "i?86" OR DETECTED_ARCH STREQUAL "x86_64")
set (X86PLAT ON)
elseif (DETECTED_ARCH MATCHES "arm.*" OR DETECTED_ARCH MATCHES "aarch64")
set (ARMPLAT ON)
Expand Down

0 comments on commit 9e94fd1

Please sign in to comment.