Kaynağa Gözat

abseil: revert optional cxx17 (#2828)

The optional cxx17 does not do anything and C++ 14 does not work with abseil
Chi Huu Huynh 1 yıl önce
ebeveyn
işleme
062c1e7862
1 değiştirilmiş dosya ile 2 ekleme ve 11 silme
  1. 2 11
      packages/a/abseil/xmake.lua

+ 2 - 11
packages/a/abseil/xmake.lua

@@ -41,8 +41,6 @@ package("abseil")
         add_frameworks("CoreFoundation")
     end
 
-    add_configs("cxx17", {description = "Use C++ 17 to compile Abseil", default = true, type = "boolean"})
-
     on_load(function (package)
         if package:is_plat("windows") and package:config("shared") then
             package:add("defines", "ABSL_CONSUME_DLL")
@@ -51,20 +49,13 @@ package("abseil")
     end)
 
     on_install("macosx", "linux", "windows", "mingw", "cross", function (package)
-        local configs = {}
-        if package:config("cxx17") then
-            table.insert(configs, "-DCMAKE_CXX_STANDARD=17")
-        end
+        local configs = {"-DCMAKE_CXX_STANDARD=17"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         import("package.tools.cmake").install(package, configs, {buildir = os.tmpfile() .. ".dir"})
     end)
 
     on_test(function (package)
-        local configs = {}
-        if package:config("cxx17") then
-            configs.languages = "cxx17"
-        end
         assert(package:check_cxxsnippets({test = [[
             #include <iostream>
             #include <string>
@@ -78,5 +69,5 @@ package("abseil")
                 auto a = absl::SimpleAtoi("123", &result);
                 std::cout << "Joined string: " << s << "\\n";
             }
-        ]]}, {configs = configs}))
+        ]]}, {configs = {languages = "cxx17"}}))
     end)