From: 박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Thu, 7 Mar 2019 00:55:12 +0000 (+0900) Subject: Do not guess build mode (native/cross) (#4607) X-Git-Tag: submit/tizen/20190325.013700~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d6c16513d2b7e09bc2cc5d5ce9a4e3cd8ac17f3;p=platform%2Fcore%2Fml%2Fnnfw.git Do not guess build mode (native/cross) (#4607) This commit updates identify_platform.cmake to use configuration variable that user provides. Signed-off-by: Jonghyun Park --- diff --git a/Makefile b/Makefile index caf4ea0..72789a1 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ endif ifeq ($(CROSS_BUILD),1) TOOLCHAIN_FILE=cmake/config/config_$(TARGET_ARCH_LC)-$(TARGET_OS).cmake OPTION_TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) + OPTIONS+= -DCROSS_BUILD=ON else OPTION_TOOLCHAIN= endif diff --git a/cmake/option/identify_platform.cmake b/cmake/option/identify_platform.cmake index 4702304..66e0255 100644 --- a/cmake/option/identify_platform.cmake +++ b/cmake/option/identify_platform.cmake @@ -40,8 +40,7 @@ else() message(FATAL_ERROR "'${TARGET_ARCH}' architecture is not supported") endif() -# Determine native or cross build -if("${HOST_ARCH}" STREQUAL "${TARGET_ARCH}") +if(NOT CROSS_BUILD) set(BUILD_IS_NATIVE True) else() set(BUILD_IS_NATIVE False)