* [Buildroot] [PATCH] package/json-for-modern-cpp: relax dependency on cmake version
@ 2018-12-31 18:53 Yann E. MORIN
2019-01-01 10:12 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2018-12-31 18:53 UTC (permalink / raw)
To: buildroot
Currently, json-for-modern-cpp requires cmake to be at least cmake-3.8,
but our dependencies only check for cmake-3.1.
It turns out that json-for-modern-cpp is over strict, and could very
well do with just cmake-3.1
Fixes:
http://autobuild.buildroot.org/results/1f8/1f893d8bc7df3bfefd31df69aba918e2121cfaf7/
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Adam Duskett <aduskett@gmail.com>
---
...system-relax-requirement-on-cmake-version.patch | 85 ++++++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 package/json-for-modern-cpp/0001-buildsystem-relax-requirement-on-cmake-version.patch
diff --git a/package/json-for-modern-cpp/0001-buildsystem-relax-requirement-on-cmake-version.patch b/package/json-for-modern-cpp/0001-buildsystem-relax-requirement-on-cmake-version.patch
new file mode 100644
index 0000000000..a5921527a0
--- /dev/null
+++ b/package/json-for-modern-cpp/0001-buildsystem-relax-requirement-on-cmake-version.patch
@@ -0,0 +1,85 @@
+From e8b6b7adc138a66f8d47396a2e707366d3771028 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Mon, 31 Dec 2018 18:42:09 +0100
+Subject: [PATCH] buildsystem: relax requirement on cmake version
+
+Commit 73cc5089 (Using target_compile_features to specify C++ 11
+standard) bumped the required cmake version, from 3.0 to 3.8, so
+as to get the definition of target_compile_features().
+
+However, target_compile_features() was introduced in cmake-3.1:
+ https://cmake.org/cmake/help/v3.1/command/target_compile_features.html
+
+And using cmake-3.1 is indeed sufficient to properly build.
+
+As such, relax the minimum required version down to cmake-3.1,
+so we can build on oldish, entreprise-grade distributions that
+only have cmake-3.1 (or at least, don't have up to cmake-3.8).
+
+Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Upstream status: MR pending
+https://github.com/nlohmann/json/pull/1409
+---
+ CMakeLists.txt | 2 +-
+ benchmarks/CMakeLists.txt | 2 +-
+ test/cmake_add_subdirectory/project/CMakeLists.txt | 2 +-
+ test/cmake_import/project/CMakeLists.txt | 2 +-
+ test/cmake_import_minver/project/CMakeLists.txt | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 409f5bff..da6f08e7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.8)
++cmake_minimum_required(VERSION 3.1)
+
+ ##
+ ## PROJECT
+diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt
+index a53812c1..dd3f3027 100644
+--- a/benchmarks/CMakeLists.txt
++++ b/benchmarks/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.8)
++cmake_minimum_required(VERSION 3.1)
+ project(JSON_Benchmarks LANGUAGES CXX)
+
+ # set compiler flags
+diff --git a/test/cmake_add_subdirectory/project/CMakeLists.txt b/test/cmake_add_subdirectory/project/CMakeLists.txt
+index 2c5be183..21357b68 100644
+--- a/test/cmake_add_subdirectory/project/CMakeLists.txt
++++ b/test/cmake_add_subdirectory/project/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.8)
++cmake_minimum_required(VERSION 3.1)
+
+ project(DummyImport CXX)
+
+diff --git a/test/cmake_import/project/CMakeLists.txt b/test/cmake_import/project/CMakeLists.txt
+index d268d72c..fe892fc1 100644
+--- a/test/cmake_import/project/CMakeLists.txt
++++ b/test/cmake_import/project/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.8)
++cmake_minimum_required(VERSION 3.1)
+
+ project(DummyImport CXX)
+
+diff --git a/test/cmake_import_minver/project/CMakeLists.txt b/test/cmake_import_minver/project/CMakeLists.txt
+index eeef3296..29056bdc 100644
+--- a/test/cmake_import_minver/project/CMakeLists.txt
++++ b/test/cmake_import_minver/project/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.8)
++cmake_minimum_required(VERSION 3.1)
+
+ project(DummyImportMinVer CXX)
+
+--
+2.14.1
+
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] package/json-for-modern-cpp: relax dependency on cmake version
2018-12-31 18:53 [Buildroot] [PATCH] package/json-for-modern-cpp: relax dependency on cmake version Yann E. MORIN
@ 2019-01-01 10:12 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-01-01 10:12 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 31 Dec 2018 19:53:44 +0100, Yann E. MORIN wrote:
> Currently, json-for-modern-cpp requires cmake to be at least cmake-3.8,
> but our dependencies only check for cmake-3.1.
>
> It turns out that json-for-modern-cpp is over strict, and could very
> well do with just cmake-3.1
>
> Fixes:
> http://autobuild.buildroot.org/results/1f8/1f893d8bc7df3bfefd31df69aba918e2121cfaf7/
>
> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Adam Duskett <aduskett@gmail.com>
> ---
> ...system-relax-requirement-on-cmake-version.patch | 85 ++++++++++++++++++++++
> 1 file changed, 85 insertions(+)
> create mode 100644 package/json-for-modern-cpp/0001-buildsystem-relax-requirement-on-cmake-version.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-01 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-31 18:53 [Buildroot] [PATCH] package/json-for-modern-cpp: relax dependency on cmake version Yann E. MORIN
2019-01-01 10:12 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.