diff options
| author | Jérôme Leclercq <[email protected]> | 2020-11-11 14:06:50 +0100 |
|---|---|---|
| committer | Jérôme Leclercq <[email protected]> | 2020-11-11 14:06:50 +0100 |
| commit | a456d7a16ba9a31071d1c8d785df412d68eb88e6 (patch) | |
| tree | 62c19477fb2b383d08695f607cce9d92ea9562cb | |
| parent | f1b890bc1717904c4e11d9cff41191e97b7ef612 (diff) | |
Replace extra warning by allextra
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 24 |
4 files changed, 15 insertions, 15 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 8e3df88d7..f9156bc03 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -137,9 +137,9 @@ function nf_warning(self, level) , less = "-W1" , more = "-W3" , all = "-W3" -- = "-Wall" will enable too more warnings + , allextra = "-W4" , everything = "-Wall" , error = "-WX" - , extra = "-W4" } -- make it diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 474244e58..99e5c38f1 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -112,9 +112,9 @@ function nf_warning(self, level) , less = "-Wall" , more = "-Wall" , all = "-Wall" + , allextra = "-Wall -Wextra" , everything = "-Wall -Wextra -Weffc++" , error = "-Werror" - , extra = "-Wextra" } return maps[level] end diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 3a469d412..4bd8706ed 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -108,9 +108,9 @@ function nf_warning(self, level) , less = "-W1" , more = "-W3" , all = "-W3" -- = "-Wall" will enable too more warnings + , allextra = "-W4" , everything = "-Wall" , error = "-WX" - , extra = "-W4" } -- for gcc & clang on linux, may be work for other gnu compatible compilers such as icc diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index cfdab0e01..6c708523e 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -274,21 +274,21 @@ end function _add_target_warnings(cmakelists, target) local flags_gcc = { - none = "-w" - , less = "-Wall" - , more = "-Wall" - , all = "-Wall" - , error = "-Werror" - , extra = "-Wextra" + none = "-w" + , less = "-Wall" + , more = "-Wall" + , all = "-Wall" + , allextra = "-Wall -Wextra" + , error = "-Werror" } local flags_msvc = { - none = "-W0" - , less = "-W1" - , more = "-W3" - , all = "-W3" -- = "-Wall" will enable too more warnings - , error = "-WX" - , extra = "-W4" + none = "-W0" + , less = "-W1" + , more = "-W3" + , all = "-W3" -- = "-Wall" will enable too more warnings + , allextra = "-W4" + , error = "-WX" } local warnings = target:get("warnings") if warnings then |
