Skip to contentSkip to conversation

cmake: upgrade 3.9.5 -> 3.10.1

PATCH In review Otavio Salvador 3 participants 3 messages Jan 17, 2018 – Jan 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 cmake: upgrade 3.9.5 -> 3.10.1

The 3.10.1 version has been in Dec 13, 2017, and has a great set of features and improvements since the last upgrade.

The release notes of 3.10 release is available at:

https://cmake.org/cmake/help/v3.10/release/3.10.html

Patches updates:

- cmake-Prevent-the-detection-of-Qt5.patch: so it replaces the sed command calls inside the cmake.inc

- 0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch:
merged upstream, so it has been removed.

- support-oe-qt4-tools-names.patch: rebased.

License-checksum-change: added new contributors

---

Changes in v4:
- avoid the explicit dependency of make (use host)

Changes in v3:
- add make-native dependency (for real)

Changes in v2:
- add make-native dependency

 meta/classes/cmake.bbclass                         |   1 +
 ...make-native_3.9.5.bb => cmake-native_3.10.1.bb} |   0
 meta/recipes-devtools/cmake/cmake.inc              |  38 +---
 ...e-find_program-if-find_host_program-is-no.patch |  40 ----
 .../cmake/cmake-Prevent-the-detection-of-Qt5.patch | 215 +++++++++++++++++++++
 .../cmake/cmake/support-oe-qt4-tools-names.patch   |  14 +-
 .../cmake/{cmake_3.9.5.bb => cmake_3.10.1.bb}      |   0
 7 files changed, 231 insertions(+), 77 deletions(-)
 rename meta/recipes-devtools/cmake/{cmake-native_3.9.5.bb => cmake-native_3.10.1.bb} (100%)
 delete mode 100644 meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
 create mode 100644 meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
 rename meta/recipes-devtools/cmake/{cmake_3.9.5.bb => cmake_3.10.1.bb} (100%)
meta/classes/cmake.bbclass +1 -0
index a4079dab0d..73328ad72e 100644
@@ -120,6 +120,7 @@ cmake_do_configure() {
 	cmake \
 	  $oecmake_sitefile \
 	  ${OECMAKE_SOURCEPATH} \
+	  -DCMAKE_MAKE_PROGRAM=${MAKE} \
 	  -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
 	  -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), d.getVar('prefix'))} \
 	  -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'), d.getVar('prefix'))} \
meta/recipes-devtools/cmake/cmake-native_3.10.1.bb renamed from meta/recipes-devtools/cmake/cmake-native_3.9.5.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/cmake/cmake-native_3.9.5.bb
rename to meta/recipes-devtools/cmake/cmake-native_3.10.1.bb
meta/recipes-devtools/cmake/cmake.inc +6 -32
index 8d65ac5690..045cce3fd0 100644
@@ -6,45 +6,19 @@ HOMEPAGE = "http://www.cmake.org/"
 BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
 SECTION = "console/utils"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=24600643e5d1d2b8f7478ae5c9074949 \
-                    file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=79b5b78197c74d5c5f9c7ccadeee4e8c \
+                    file://Source/cmake.h;md5=4494dee184212fc89c469c3acd555a14;beginline=1;endline=3 \
+                    "
 
 CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 
 SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch \
            file://qt4-fail-silent.patch \
-           file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
+           file://cmake-Prevent-the-detection-of-Qt5.patch \
            "
 
-SRC_URI[md5sum] = "0922130d0e0c142a88e58c6e4fef4d7d"
-SRC_URI[sha256sum] = "6220c1683b4e6bb8f38688fa3ffb17a7cf39f36317c2ddfdc3f12f09d086c166"
+SRC_URI[md5sum] = "9a726e5ec69618b172aa4b06d18c3998"
+SRC_URI[sha256sum] = "7be36ee24b0f5928251b644d29f5ff268330a916944ef4a75e23ba01e7573284"
 
 UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-
-# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
-# and possibly missing qmake binary (qtbase-native can be removed from sysroot
-# e.g. in order to upgrade it, even when there is target qtbase)
-
-# Fixes errors like this in cmake(-native).do_configure:
-#| -- Performing Test run_pic_test - Success
-#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
-#|   The imported target "Qt5::Core" references the file
-#|
-#|      "/qmake"
-#|
-#|   but this file does not exist.  Possible reasons include:
-
-do_configure_prepend() {
-	sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Widgets QUIET NO_MODULE)/#  find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
-	sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Widgets REQUIRED)/#  find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Widgets REQUIRED)/#  find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
-	sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core REQUIRED)/g' ${S}/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
-	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/mocRerun/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/rccDepends/CMakeLists.txt
-	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/mocDepends/CMakeLists.txt
-	sed -i 's/^find_package(Qt5Widgets REQUIRED)/#find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/mocPlugin/CMakeLists.txt
-}
meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch deleted +0 -40
deleted file mode 100644
index 9b820db009..0000000000
@@ -1,40 +0,0 @@
-From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001
-From: Maxime Roussin-Bélanger <[email protected]>
-Date: Mon, 26 Jun 2017 11:30:07 -0400
-Subject: [PATCH] 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`.
-
-Upstream-Status: Accepted
-[https://gitlab.kitware.com/cmake/cmake/merge_requests/1009]
-        - Will be in 3.10
-
-Signed-off-by: Maxime Roussin-Bélanger <[email protected]>
----
- Modules/FindCUDA.cmake | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
-index a4dca54..77ca351 100644
---- a/Modules/FindCUDA.cmake
-+++ b/Modules/FindCUDA.cmake
-@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
-   # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
-   set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
-   macro( cuda_find_host_program )
--    find_host_program( ${ARGN} )
-+    if (COMMAND find_host_program)
-+      find_host_program( ${ARGN} )
-+    else()
-+      find_program( ${ARGN} )
-+    endif()
-   endmacro()
- else()
-   # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR
---
-2.1.4
-
meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch new file +215 -0

215 lines not on this page · raw message

meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch +9 -5
index 15cbca89d8..6841554763 100644
@@ -1,4 +1,7 @@
-cmake: support OpenEmbedded Qt4 tool binary names
+From 10b8b523869124d2fc8cd98d9e028c0bcffd61b1 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <[email protected]>
+Date: Thu, 12 May 2011 15:36:03 +0000
+Subject: [PATCH 1/2] cmake: support OpenEmbedded Qt4 tool binary names
 
 The FindQt4 module looks for Qt4 binaries to be able to gather the
 paths used for compilation and also to be using during other processes
@@ -15,15 +18,16 @@ The patch was slightly adapted in order to match cmake 3.2.2:
 Instead of find_program, _find_qt4_program is now used.
 
 Signed-off-by: Moritz Blume <[email protected]>
+
 ---
  Modules/FindQt4.cmake | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 11091b5..6704769 100644
+index c67d0be..0cf169b 100644
 --- a/Modules/FindQt4.cmake
 +++ b/Modules/FindQt4.cmake
-@@ -522,7 +522,7 @@ endfunction()
+@@ -516,7 +516,7 @@ endfunction()
  
  set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
  
@@ -32,7 +36,7 @@ index 11091b5..6704769 100644
  _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
  
  if (QT_QMAKE_EXECUTABLE AND
-@@ -1148,12 +1148,12 @@ if (QT_QMAKE_EXECUTABLE AND
+@@ -1142,12 +1142,12 @@ if (QT_QMAKE_EXECUTABLE AND
    _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
    _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
    _find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
@@ -50,5 +54,5 @@ index 11091b5..6704769 100644
    _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
  
 -- 
-1.9.1
+2.7.4
 
meta/recipes-devtools/cmake/cmake_3.10.1.bb renamed from meta/recipes-devtools/cmake/cmake_3.9.5.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/cmake/cmake_3.9.5.bb
rename to meta/recipes-devtools/cmake/cmake_3.10.1.bb
Signature · 1 line
2.15.1
#1 lore raw
Quoted 12 lines · Otavio Salvador

The 3.10.1 version has been in Dec 13, 2017, and has a great set of features and improvements since the last upgrade.

The release notes of 3.10 release is available at:

https://cmake.org/cmake/help/v3.10/release/3.10.html

Patches updates:

- cmake-Prevent-the-detection-of-Qt5.patch: so it replaces the sed command calls inside the cmake.inc

Quoted 7 lines

- 0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch:
merged upstream, so it has been removed.

- support-oe-qt4-tools-names.patch: rebased.

License-checksum-change: added new contributors

Is there any reason why it didn't make master yet?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw

Look again :)

Quoted 29 lines · Otavio Salvador
Quoted 12 lines · Otavio Salvador

The 3.10.1 version has been in Dec 13, 2017, and has a great set of features and improvements since the last upgrade.

The release notes of 3.10 release is available at:

https://cmake.org/cmake/help/v3.10/release/3.10.html

Patches updates:

- cmake-Prevent-the-detection-of-Qt5.patch: so it replaces the sed command calls inside the cmake.inc

Quoted 7 lines

- 0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch:
merged upstream, so it has been removed.

- support-oe-qt4-tools-names.patch: rebased.

License-checksum-change: added new contributors

Is there any reason why it didn't make master yet?

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750