<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 27 June 2017 at 17:14, Maxime Roussin-Bélanger <span dir="ltr">&lt;<a href="mailto:maxime.roussinbelanger@gmail.com" target="_blank">maxime.roussinbelanger@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">CMake does not define the `find_host_program` command we&#39;ve<br>
been using in the cross-compiling code path.  It was<br>
provided by a widely used Android toolchain file.  For<br>
compatibility, continue to use `find_host_program` if<br>
available, but otherwise use just `find_program`.<br>
<br>
Upstream-Status: Accepted [<a href="https://gitlab.kitware.com/cmake/cmake/merge_requests/1009" rel="noreferrer" target="_blank">https://gitlab.kitware.com/<wbr>cmake/cmake/merge_requests/<wbr>1009</a>]<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">        - Will be in 3.10<br></blockquote><div><br></div><div>The upstream work is much appreciated, thanks. However, the Upstream-Status tag needs to be in the actual patch file commit message (the idea is that when cmake recipe version is next upgraded, it&#39;s easy to see from the patch file alone whether it&#39;s still needed or not). Sorry for not being explicit about that.</div><div> </div><div>Thanks,</div><div>  Jussi</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Signed-off-by: Maxime Roussin-Bélanger &lt;<a href="mailto:maxime.roussinbelanger@gmail.com">maxime.roussinbelanger@gmail.<wbr>com</a>&gt;<br>
---<br>
Changes in v2:<br>
        - Add upstream-status<br>
<span class="gmail-"><br>
 meta/recipes-devtools/cmake/<wbr>cmake.inc              |  1 +<br>
 ...e-find_program-if-find_<wbr>host_program-is-no.patch | 36 ++++++++++++++++++++++<br>
 2 files changed, 37 insertions(+)<br>
 create mode 100644 meta/recipes-devtools/cmake/<wbr>cmake/0001-FindCUDA-Use-find_<wbr>program-if-find_host_program-<wbr>is-no.patch<br>
<br>
</span>diff --git a/meta/recipes-devtools/cmake/<wbr>cmake.inc b/meta/recipes-devtools/cmake/<wbr>cmake.inc<br>
index dbd34f5..6aeb25f 100644<br>
--- a/meta/recipes-devtools/cmake/<wbr>cmake.inc<br>
+++ b/meta/recipes-devtools/cmake/<wbr>cmake.inc<br>
@@ -14,6 +14,7 @@ CMAKE_MAJOR_VERSION = &quot;${@&#39;.&#39;.join(d.getVar(&#39;PV&#39;).<wbr>split(&#39;.&#39;)[0:2])}&quot;<br>
 SRC_URI = &quot;<a href="https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz" rel="noreferrer" target="_blank">https://cmake.org/files/v${<wbr>CMAKE_MAJOR_VERSION}/cmake-${<wbr>PV}.tar.gz</a> \<br>
            file://support-oe-qt4-tools-<wbr>names.patch \<br>
            file://qt4-fail-silent.patch \<br>
+           file://0001-FindCUDA-Use-find_<wbr>program-if-find_host_program-<wbr>is-no.patch \<br>
            &quot;<br>
<br>
 SRC_URI[md5sum] = &quot;<wbr>b5dff61f6a7f1305271ab3f6ae2614<wbr>19&quot;<br>
diff --git a/meta/recipes-devtools/cmake/<wbr>cmake/0001-FindCUDA-Use-find_<wbr>program-if-find_host_program-<wbr>is-no.patch b/meta/recipes-devtools/cmake/<wbr>cmake/0001-FindCUDA-Use-find_<wbr>program-if-find_host_program-<wbr>is-no.patch<br>
new file mode 100644<br>
index 0000000..8a61f1f<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/cmake/<wbr>cmake/0001-FindCUDA-Use-find_<wbr>program-if-find_host_program-<wbr>is-no.patch<br>
@@ -0,0 +1,36 @@<br>
+From 46d25e782ebd9b6c50771b6f30433c<wbr>58fae03a51 Mon Sep 17 00:00:00 2001<br>
+From: Maxime Roussin-Bélanger &lt;<a href="mailto:maxime.roussinbelanger@gmail.com">maxime.roussinbelanger@gmail.<wbr>com</a>&gt;<br>
+Date: Mon, 26 Jun 2017 11:30:07 -0400<br>
+Subject: [PATCH] cmake: Use find_program if find_host_program is not<br>
+ available<br>
+<br>
+CMake does not define the `find_host_program` command we&#39;ve been using<br>
+in the cross-compiling code path.  It was provided by a widely used<br>
+Android toolchain file.  For compatibility, continue to use<br>
+`find_host_program` if available, but otherwise use just `find_program`.<br>
+<br>
+Signed-off-by: Maxime Roussin-Bélanger &lt;<a href="mailto:maxime.roussinbelanger@gmail.com">maxime.roussinbelanger@gmail.<wbr>com</a>&gt;<br>
+---<br>
+ Modules/FindCUDA.cmake | 6 +++++-<br>
+ 1 file changed, 5 insertions(+), 1 deletion(-)<br>
+<br>
+diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake<br>
+index a4dca54..77ca351 100644<br>
+--- a/Modules/FindCUDA.cmake<br>
++++ b/Modules/FindCUDA.cmake<br>
+@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)<br>
+   # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers<br>
+   set( CMAKE_FIND_ROOT_PATH &quot;${CUDA_TOOLKIT_TARGET_DIR};${<wbr>CMAKE_FIND_ROOT_PATH}&quot;)<br>
+   macro( cuda_find_host_program )<br>
+-    find_host_program( ${ARGN} )<br>
++    if (COMMAND find_host_program)<br>
++      find_host_program( ${ARGN} )<br>
++    else()<br>
++      find_program( ${ARGN} )<br>
++    endif()<br>
+   endmacro()<br>
+ else()<br>
+   # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR<br>
+--<br>
+2.1.4<br>
+<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">--<br>
2.1.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br></div></div>