]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cmake: drop OE specific environment variable support
authorChen Qi <Qi.Chen@windriver.com>
Tue, 22 Aug 2023 02:14:25 +0000 (19:14 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Aug 2023 08:40:55 +0000 (09:40 +0100)
CMAKE_TOOLCHAIN_FILE is now also a supported environment
variable, we can export it directly. There's no need to
use a OE specific patch to add OE_CMAKE_TOOLCHAIN_FILE
support.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/cmake/cmake-native_3.26.4.bb
meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch [deleted file]
meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
meta/recipes-devtools/cmake/cmake_3.26.4.bb

index 2177aa81a492045415639f7814f5bd492b7cc7a0..26a3331cb0eeaf3b1de833611fb2a6d1b873047a 100644 (file)
@@ -5,7 +5,6 @@ DEPENDS += "bzip2-replacement-native xz-native zlib-native ncurses-native zstd-n
 
 SRC_URI += "file://OEToolchainConfig.cmake \
             file://environment.d-cmake.sh \
-            file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
             file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
             file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
             "
diff --git a/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
deleted file mode 100644 (file)
index d13c367..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 5acfcb2aba1a5641d390558fdf288373f5e39cb5 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 2c2c2ac3..fae4f97f 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.
index 7bdb19fb6ce9c04cfd9c0cbca905590a7fb5ecb2..c94b6bb3e346d6877b5842b5d1ef98c1ec37ed89 100644 (file)
@@ -1,2 +1,2 @@
-export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
+export CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
 export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e s/lib//`"
index bb7ed83e308bf9e73507347066fb33249c4c8b52..ae29a3a94591655143175cbaf32d8c18d7cae2e9 100644 (file)
@@ -9,7 +9,6 @@ SRC_URI:append:class-nativesdk = " \
     file://SDKToolchainConfig.cmake.template \
     file://cmake-setup.py \
     file://environment.d-cmake.sh \
-    file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
 "
 
 LICENSE:append = " & BSD-1-Clause & MIT"