summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMaxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>2017-06-27 10:47:31 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-06 14:38:13 +0100
commit38641c842cadd8be4d6abef4988664f03adc476d (patch)
tree8864b4c4c992f83f3923cce6129515273c900bd5 /meta/recipes-devtools
parent43ff2881f198873ffe3700c4e1025cedfa494eb6 (diff)
downloadpoky-38641c842cadd8be4d6abef4988664f03adc476d.tar.gz
cmake: Use find_program if find_host_program is not available
CMake does not define the `find_host_program` command we've been using in the cross-compiling code path. It was provided by a widely used Android toolchain file. For compatibility, continue to use `find_host_program` if available, but otherwise use just `find_program`. (From OE-Core rev: e5f4e0df64531e2296bb1f5002eb106c3eec61e3) Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc1
-rw-r--r--meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch40
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index dbd34f542c..6aeb25fdd5 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -14,6 +14,7 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
14SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ 14SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
15 file://support-oe-qt4-tools-names.patch \ 15 file://support-oe-qt4-tools-names.patch \
16 file://qt4-fail-silent.patch \ 16 file://qt4-fail-silent.patch \
17 file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
17 " 18 "
18 19
19SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419" 20SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch b/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
new file mode 100644
index 0000000000..9b820db009
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
@@ -0,0 +1,40 @@
1From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001
2From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
3Date: Mon, 26 Jun 2017 11:30:07 -0400
4Subject: [PATCH] cmake: Use find_program if find_host_program is not
5 available
6
7CMake does not define the `find_host_program` command we've been using
8in the cross-compiling code path. It was provided by a widely used
9Android toolchain file. For compatibility, continue to use
10`find_host_program` if available, but otherwise use just `find_program`.
11
12Upstream-Status: Accepted
13[https://gitlab.kitware.com/cmake/cmake/merge_requests/1009]
14 - Will be in 3.10
15
16Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
17---
18 Modules/FindCUDA.cmake | 6 +++++-
19 1 file changed, 5 insertions(+), 1 deletion(-)
20
21diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
22index a4dca54..77ca351 100644
23--- a/Modules/FindCUDA.cmake
24+++ b/Modules/FindCUDA.cmake
25@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
26 # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
27 set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
28 macro( cuda_find_host_program )
29- find_host_program( ${ARGN} )
30+ if (COMMAND find_host_program)
31+ find_host_program( ${ARGN} )
32+ else()
33+ find_program( ${ARGN} )
34+ endif()
35 endmacro()
36 else()
37 # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR
38--
392.1.4
40