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 PACKAGECONFIG[snappy] = ",,snappy" PACKAGECONFIG[tcmalloc] = ",,gperftools" +# CMake policy override is only required for (and only affects) the bundled GTest submodule. +# System GTest can not be used instead, since (among other things) it requires C++14 and the project uses C++11. EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \ - -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)}" + -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)} \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ +" do_install:append() { install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil