diff options
author | jeff <jhatch@multitech.com> | 2023-01-24 09:37:57 -0600 |
---|---|---|
committer | jeff <jhatch@multitech.com> | 2023-01-24 09:37:57 -0600 |
commit | c94c9986362ebf4084734a3963415c5d894cf3a6 (patch) | |
tree | 1f5d79df115e23318d93bfc9e99dddecf9be8748 /recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch | |
parent | 8400520cffdd3c133c684eac60ab438a7ecaa050 (diff) | |
parent | 2eaa3fd064097eb221b56d5df0e7136ba705a0cd (diff) | |
download | meta-mlinux-c94c9986362ebf4084734a3963415c5d894cf3a6.tar.gz meta-mlinux-c94c9986362ebf4084734a3963415c5d894cf3a6.tar.bz2 meta-mlinux-c94c9986362ebf4084734a3963415c5d894cf3a6.zip |
Merge branch 'md/cve-fixes2-squashed' into 6
Diffstat (limited to 'recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch')
-rw-r--r-- | recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch new file mode 100644 index 0000000..9a2287f --- /dev/null +++ b/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch @@ -0,0 +1,44 @@ +From 89f6c846f02ad6d30b9ebb7eaaaa4fb6f9cec054 Mon Sep 17 00:00:00 2001 +From: Cody P Schafer <dev@codyps.com> +Date: Thu, 27 Apr 2017 11:35:05 -0400 +Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default + toolchain file in sdk + +Passing the toolchain by: + + - shell aliases does not work if cmake is called by a script + - unconditionally by a wrapper script causes cmake to believe it is + configuring things when it is not (for example, `cmake --build` breaks). + +The OE_CMAKE_TOOLCHAIN_FILE variable is only used as a default if no +toolchain is explicitly specified. + +Setting the CMAKE_TOOLCHAIN_FILE cmake variable is marked as cached +because '-D' options are cache entries themselves. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Cody P Schafer <dev@codyps.com> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> + +--- + Modules/CMakeDetermineSystem.cmake | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake +index 8c7af067..ade2b189 100644 +--- a/Modules/CMakeDetermineSystem.cmake ++++ b/Modules/CMakeDetermineSystem.cmake +@@ -112,6 +112,13 @@ else() + endif() + endif() + ++if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) ++ if(DEFINED ENV{OE_CMAKE_TOOLCHAIN_FILE}) ++ set(CMAKE_TOOLCHAIN_FILE "$ENV{OE_CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH "toolchain file") ++ message(STATUS "Toolchain file defaulted to '${CMAKE_TOOLCHAIN_FILE}'") ++ endif() ++endif() ++ + # if a toolchain file is used, the user wants to cross compile. + # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_* + # variables around so they can be used in CMakeLists.txt. |