Update xmake.lua (#3846)

Add a flag "rtti" to enable RTTI builds in Rocksdb. RTTI build is necessary if the user wants to use the API of MergeOperator.
pull/3848/head
ZK Wang 9 months ago committed by GitHub
parent 5405d6f277
commit 254b6ccc3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      packages/r/rocksdb/xmake.lua

@ -16,6 +16,7 @@ package("rocksdb")
add_configs("zlib", {description = "Build with zlib.", default = false, type = "boolean"})
add_configs("zstd", {description = "Build with zstd.", default = false, type = "boolean"})
add_configs("gflags", {description = "Build with gflags.", default = false, type = "boolean"})
add_configs("rtti", {description = "Enable RTTI builds.", default = false, type = "boolean"})
if is_plat("linux") then
add_syslinks("pthread", "rt", "dl")
@ -25,7 +26,7 @@ package("rocksdb")
on_load(function (package)
for name, enabled in pairs(package:configs()) do
if not package:extraconf("configs", name, "builtin") then
if (name ~= "rtti") and (not package:extraconf("configs", name, "builtin")) then
if enabled then
package:add("deps", name)
end
@ -45,7 +46,11 @@ package("rocksdb")
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DROCKSDB_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
for name, enabled in pairs(package:configs()) do
if not package:extraconf("configs", name, "builtin") then
if name == "rtti" then
if enabled then
table.insert(configs, "-DUSE_RTTI=1")
end
elseif not package:extraconf("configs", name, "builtin") then
table.insert(configs, "-DWITH_" .. name:upper() .. "=" .. (enabled and "ON" or "OFF"))
end
end

Loading…
Cancel
Save