From 608602d0de1056f856e0b6bfe33b3f5fbe641b63 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 16 Jun 2015 14:26:32 +0800 Subject: compile for android and ios ok --- xmake/scripts/base/compiler.lua | 2 ++ xmake/scripts/base/io.lua | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'xmake/scripts/base') diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua index bbbc671b6..9a2f9eb43 100644 --- a/xmake/scripts/base/compiler.lua +++ b/xmake/scripts/base/compiler.lua @@ -186,6 +186,8 @@ function compiler._addflags_from_target(module, flags, flagnames, target) -- add the warning flags from the current project table.join2(flags, compiler._getflags(module, target.warnings, { none = "-w" + , less = "-W1" + , more = "-W3" , all = "-Wall" , error = "-Werror" })) diff --git a/xmake/scripts/base/io.lua b/xmake/scripts/base/io.lua index db7c2b934..c1808f731 100644 --- a/xmake/scripts/base/io.lua +++ b/xmake/scripts/base/io.lua @@ -179,15 +179,26 @@ function io.load(filepath) end -- cat the given file -function io.cat(filepath) +function io.cat(filepath, linecount) -- open file local file = io.open(filepath, "r") if file then -- show file + local count = 1 for line in file:lines() do + + -- show line print(line) + + -- end? + if linecount and count >= linecount then + break + end + + -- update the line count + count = count + 1 end -- exit file -- cgit v1.3.1