diff options
| author | ruki <[email protected]> | 2018-08-10 22:54:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-08-10 11:29:26 +0800 |
| commit | a114fc03b467a5de249496ddc0b32e138d934f44 (patch) | |
| tree | a8937c7c48be73d4b7ab7d6651062df820c231b0 | |
| parent | 2a7d3704912245a2433d1071679f4253d96069c0 (diff) | |
remove some macro defines in cl.lua
| -rw-r--r-- | core/src/luajit/xmake.lua | 1 | ||||
| -rw-r--r-- | core/xmake.lua | 5 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 16 | ||||
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 5 |
4 files changed, 16 insertions, 11 deletions
diff --git a/core/src/luajit/xmake.lua b/core/src/luajit/xmake.lua index ad6ba5261..964c50538 100644 --- a/core/src/luajit/xmake.lua +++ b/core/src/luajit/xmake.lua @@ -45,4 +45,5 @@ target("luajit") add_defines("LUAJIT_DISABLE_JIT") end + diff --git a/core/xmake.lua b/core/xmake.lua index b9f032680..cd2999cc0 100644 --- a/core/xmake.lua +++ b/core/xmake.lua @@ -55,6 +55,11 @@ option("curses") add_defines("XM_CONFIG_API_HAVE_CURSES") option_end() +-- suppress warnings +if is_plat("windows") then + add_defines("_CRT_SECURE_NO_WARNINGS") +end + -- add projects includes("src/lcurses", "src/sv","src/luajit", "src/tbox", "src/xmake", "src/demo") if is_plat("windows") then diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 0dc8d3aa4..2c2b20ae4 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -729,14 +729,14 @@ function target:sourcefiles() -- the patterns local patterns = { - {"([%w%*]+)%.obj|", "%1|", "object"} - , {"([%w%*]+)%.obj$", "%1", "object"} - , {"([%w%*]+)%.o|", "%1|", "object"} - , {"([%w%*]+)%.o$", "%1", "object"} - , {"([%w%*]+)%.lib|", "%1|", "static"} - , {"([%w%*]+)%.lib$", "%1", "static"} - , {"lib([%w%*]+)%.a|", "%1|", "static"} - , {"lib([%w%*]+)%.a$", "%1", "static"} + {"([%w%*]+)%.obj|", "%%1|", "object"} + , {"([%w%*]+)%.obj$", "%%1", "object"} + , {"([%w%*]+)%.o|", "%%1|", "object"} + , {"([%w%*]+)%.o$", "%%1", "object"} + , {"([%w%*]+)%.lib|", "%%1|", "static"} + , {"([%w%*]+)%.lib$", "%%1", "static"} + , {"lib([%w%*]+)%.a|", "%%1|", "static"} + , {"lib([%w%*]+)%.a$", "%%1", "static"} } -- match files diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 2166d6a85..4b3eaa8ad 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -30,14 +30,13 @@ import("core.language.language") function init(self) -- init cxflags - _g.cxflags = { "-nologo", "-MP4", "-D_MBCS", "-D_CRT_SECURE_NO_WARNINGS"} + _g.cxflags = { "-nologo", "-MP4" } -- init flags map _g.mapflags = { -- optimize ["-O0"] = "-Od" - , ["-O1"] = "" , ["-Os"] = "-O1" , ["-O3"] = "-Ox" , ["-Ofast"] = "-Ox -fp:fast" @@ -147,7 +146,7 @@ function nf_optimize(self, level) local maps = { none = "-Od" - , faster = "-Ox" + , faster = "-O2" , fastest = "-Ox -fp:fast" , smallest = "-O1" , aggressive = "-Ox -fp:fast" |
