mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-06 16:48:54 +00:00
arm/trusted-services: pass through CMake generator
Pass through the choice of CMake Generator when starting sub-cmakes for the external components, so that they use Ninja instead of Make. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From e62709f8e6f586ace7975b58b8a1c726d120759f Mon Sep 17 00:00:00 2001
|
||||
From: Gyorgy Szing <Gyorgy.Szing@arm.com>
|
||||
Date: Thu, 31 Aug 2023 18:24:50 +0200
|
||||
Subject: [PATCH] LazyFetch: allow setting the cmake generator
|
||||
|
||||
Allow configuring the CMake generator used for external components. By
|
||||
default use the generator the main project is using.
|
||||
For details see the documentation in tools/cmake/common/LazyFetch.cmake.
|
||||
|
||||
Change-Id: Ie01ea1ae533cf7a40c1f09808de2ad2e83a09db3
|
||||
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
---
|
||||
tools/cmake/common/LazyFetch.cmake | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/tools/cmake/common/LazyFetch.cmake b/tools/cmake/common/LazyFetch.cmake
|
||||
index 68e790e..7676201 100644
|
||||
--- a/tools/cmake/common/LazyFetch.cmake
|
||||
+++ b/tools/cmake/common/LazyFetch.cmake
|
||||
@@ -87,11 +87,20 @@ function(LazyFetch_ConfigAndBuild)
|
||||
"component specific. Pleas refer to the upstream documentation for more information.")
|
||||
endif()
|
||||
|
||||
+ if(NOT DEFINED ${UC_DEP_NAME}_GENERATOR)
|
||||
+ if(DEFINED ENV{${UC_DEP_NAME}_GENERATOR})
|
||||
+ set(${UC_DEP_NAME}_GENERATOR ENV{${UC_DEP_NAME}_GENERATOR} CACHE STRING "CMake generator used for ${UC_DEP_NAME}.")
|
||||
+ else()
|
||||
+ set(${UC_DEP_NAME}_GENERATOR ${CMAKE_GENERATOR} CACHE STRING "CMake generator used for ${UC_DEP_NAME}.")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
execute_process(COMMAND
|
||||
${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
|
||||
${CMAKE_COMMAND}
|
||||
"-C${CONFIGURED_CACHE_FILE}"
|
||||
-DCMAKE_BUILD_TYPE=${${UC_DEP_NAME}_BUILD_TYPE}
|
||||
+ -G${${UC_DEP_NAME}_GENERATOR}
|
||||
-S ${BUILD_SRC_DIR}
|
||||
-B ${BUILD_BIN_DIR}
|
||||
RESULT_VARIABLE
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -9,6 +9,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI:append = "\
|
||||
file://0001-Limit-nanopb-build-to-single-process.patch \
|
||||
file://0001-LazyFetch-allow-setting-the-cmake-generator.patch \
|
||||
"
|
||||
|
||||
#Latest on 2023 April 28
|
||||
|
||||
Reference in New Issue
Block a user