remove systemversion string validation

This commit is contained in:
Renaud Guillard 2020-06-15 10:29:16 +02:00
parent c923e04486
commit 5b6ba6ec27
4 changed files with 4 additions and 6 deletions

View File

@ -93,7 +93,7 @@
if cfg.system == p.MACOSX or cfg.system == p.IOS then
local minVersion = p.project.systemversion(cfg)
if (type (minVersion) == "string") and (string.match(minVersion, "^%d+%.%d+") ~= nil) then
if minVersion ~= nil then
local name = iif(cfg.system == p.MACOSX, "macosx", "iphoneos")
table.insert (flags, "-m" .. name .. "-version-min=" .. p.project.systemversion(cfg))
end

View File

@ -172,7 +172,7 @@
if cfg.system == p.MACOSX then
local minVersion = p.project.systemversion(cfg)
if (type (minVersion) == "string") and (string.match(minVersion, "^%d+%.%d+") ~= nil) then
if minVersion ~= nil then
table.insert (flags, "-mmacosx-version-min=" .. minVersion)
end
end

View File

@ -45,9 +45,8 @@
test.contains({ "-mmacosx-version-min=10.9" }, clang.getcxxflags(cfg))
end
function suite.cxxflags_macosx_systemversion_invalid()
function suite.cxxflags_macosx_systemversion_unspecified()
system "MacOSX"
systemversion "weird"
prepare()
test.excludes({ "-mmacosx-version-min=10.9" }, clang.getcxxflags(cfg))
end

View File

@ -400,9 +400,8 @@
test.contains({ "-mmacosx-version-min=10.9" }, gcc.getcxxflags(cfg))
end
function suite.cxxflags_macosx_systemversion_invalid()
function suite.cxxflags_macosx_systemversion_unspecified()
system "MacOSX"
systemversion "strange"
prepare()
test.excludes({ "-mmacosx-version-min=10.9" }, gcc.getcxxflags(cfg))
end