diff options
author | Moritz Haase <Moritz.Haase@bmw.de> | 2025-07-15 09:18:10 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-07-15 07:49:27 -0700 |
commit | a08eabb3b87da69a71793bb8eaa2d64a6ac96aeb (patch) | |
tree | 694fdf24190545b4e3bda30fc01606b87748e8d5 | |
parent | 536572f862dc443a73768820a19b7fa403190432 (diff) | |
download | meta-openembedded-a08eabb3b87da69a71793bb8eaa2d64a6ac96aeb.tar.gz |
leveldb: Allow to build with CMake 4+
The component itself builds just fine with CMake 4, but the tests don't as they
rely on a bundled version of GTest that is six years old. Since upstream is
inactive, the simplest course of action is to apply the 'minimum policy version'
override (as implemented in CMake, it only affects the GTest submodule).
System GTest can not be used instead (easily), as among other things it requires
C++14 and the project uses C++11.
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
CC: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb b/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb index 9cefc528ae..1ccf115793 100644 --- a/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb +++ b/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb | |||
@@ -18,8 +18,12 @@ PACKAGECONFIG[benchmarks] = "-DLEVELDB_BUILD_BENCHMARKS=ON,-DLEVELDB_BUILD_BENCH | |||
18 | PACKAGECONFIG[snappy] = ",,snappy" | 18 | PACKAGECONFIG[snappy] = ",,snappy" |
19 | PACKAGECONFIG[tcmalloc] = ",,gperftools" | 19 | PACKAGECONFIG[tcmalloc] = ",,gperftools" |
20 | 20 | ||
21 | # CMake policy override is only required for (and only affects) the bundled GTest submodule. | ||
22 | # System GTest can not be used instead, since (among other things) it requires C++14 and the project uses C++11. | ||
21 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \ | 23 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \ |
22 | -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)}" | 24 | -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)} \ |
25 | -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ | ||
26 | " | ||
23 | 27 | ||
24 | do_install:append() { | 28 | do_install:append() { |
25 | install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil | 29 | install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil |