Browse Source

Remove unneeded dependency on our own Premake helpers.

pull/696/head
Joao Matos 10 years ago
parent
commit
5dac663926
  1. 14
      build/Helpers.lua
  2. 2
      build/Parser.lua
  3. 4
      build/Tests.lua
  4. 2
      build/scripts/LLVM.lua
  5. 8
      src/CppParser/Bindings/premake5.lua
  6. 2
      src/CppParser/premake5.lua

14
build/Helpers.lua

@ -24,18 +24,6 @@ gcc_buildflags = { "-std=c++11 -fpermissive" } @@ -24,18 +24,6 @@ gcc_buildflags = { "-std=c++11 -fpermissive" }
msvc_cpp_defines = { }
function os.is_osx()
return os.is("macosx")
end
function os.is_windows()
return os.is("windows")
end
function os.is_linux()
return os.is("linux")
end
function string.starts(str, start)
return string.sub(str, 1, string.len(start)) == start
end
@ -79,7 +67,7 @@ function SetupManagedProject() @@ -79,7 +67,7 @@ function SetupManagedProject()
language "C#"
location (path.join(builddir, "projects"))
if not os.is_osx() then
if not os.is("macosx") then
local c = configuration { "vs*" }
location "."
configuration(c)

2
build/Parser.lua

@ -11,7 +11,7 @@ function SetupCSharpParser() @@ -11,7 +11,7 @@ function SetupCSharpParser()
end
function SetupParser()
if string.match(action, "vs*") and os.is_windows() then
if string.match(action, "vs*") and os.is("windows") then
SetupCLIParser()
else
SetupCSharpParser()

4
build/Tests.lua

@ -76,7 +76,7 @@ function SetupTestGeneratorBuildEvent(name) @@ -76,7 +76,7 @@ function SetupTestGeneratorBuildEvent(name)
end
function SetupTestNativeProject(name, depends)
if string.starts(action, "vs") and not os.is_windows() then
if string.starts(action, "vs") and not os.is("windows") then
return
end
@ -141,7 +141,7 @@ function SetupTestProjectsCSharp(name, depends) @@ -141,7 +141,7 @@ function SetupTestProjectsCSharp(name, depends)
end
function SetupTestProjectsCLI(name, extraFiles)
if not os.is_windows() then
if not os.is("windows") then
return
end

2
build/scripts/LLVM.lua

@ -154,7 +154,7 @@ end @@ -154,7 +154,7 @@ end
function cmake(gen, conf, builddir, options)
local cwd = os.getcwd()
os.chdir(builddir)
local cmake = os.is_osx() and "/Applications/CMake.app/Contents/bin/cmake"
local cmake = os.is("macosx") and "/Applications/CMake.app/Contents/bin/cmake"
or "cmake"
local cmd = cmake .. " -G " .. '"' .. gen .. '"'
.. ' -DLLVM_BUILD_TOOLS=false '

8
src/CppParser/Bindings/premake5.lua

@ -15,9 +15,9 @@ project "CppSharp.Parser.CSharp" @@ -15,9 +15,9 @@ project "CppSharp.Parser.CSharp"
links { "CppSharp.Runtime" }
if os.is_windows() then
if os.is("windows") then
files { "CSharp/i686-pc-win32-msvc/**.cs" }
elseif os.is_osx() then
elseif os.is("macosx") then
local file = io.popen("lipo -info `which mono`")
local output = file:read('*all')
if string.find(output, "x86_64") then
@ -26,7 +26,7 @@ project "CppSharp.Parser.CSharp" @@ -26,7 +26,7 @@ project "CppSharp.Parser.CSharp"
files { "CSharp/i686-apple-darwin12.4.0/**.cs" }
end
elseif os.is_linux() then
elseif os.is("linux") then
files { "CSharp/x86_64-linux-gnu/**.cs" }
else
print "Unknown architecture"
@ -34,7 +34,7 @@ project "CppSharp.Parser.CSharp" @@ -34,7 +34,7 @@ project "CppSharp.Parser.CSharp"
configuration ""
if string.starts(action, "vs") and os.is_windows() then
if string.starts(action, "vs") and os.is("windows") then
project "CppSharp.Parser.CLI"

2
src/CppParser/premake5.lua

@ -6,7 +6,7 @@ clang_msvc_flags = @@ -6,7 +6,7 @@ clang_msvc_flags =
"/wd4141", -- 'inline' : used more than once
}
if not (string.starts(action, "vs") and not os.is_windows()) then
if not (string.starts(action, "vs") and not os.is("windows")) then
project "CppSharp.CppParser"

Loading…
Cancel
Save