diff options
| author | Jérôme Leclercq <[email protected]> | 2020-11-10 14:58:01 +0100 |
|---|---|---|
| committer | Jérôme Leclercq <[email protected]> | 2020-11-10 14:58:01 +0100 |
| commit | f1b890bc1717904c4e11d9cff41191e97b7ef612 (patch) | |
| tree | 52c95feccd6f04155da9c3f93de3a6c3371aee3b | |
| parent | 979df33ee2e84c77242fe1c07cef3d9a1a3def90 (diff) | |
Add support for "extra" warning level
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 2 |
4 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 1144023c5..8e3df88d7 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -139,6 +139,7 @@ function nf_warning(self, level) , all = "-W3" -- = "-Wall" will enable too more warnings , 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 5418ecf27..474244e58 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -114,6 +114,7 @@ function nf_warning(self, level) , all = "-Wall" , 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 d5a7ef6d2..3a469d412 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -110,6 +110,7 @@ function nf_warning(self, level) , all = "-W3" -- = "-Wall" will enable too more warnings , everything = "-Wall" , error = "-WX" + , extra = "-W4" } -- for gcc & clang on linux, may be work for other gnu compatible compilers such as icc @@ -125,6 +126,7 @@ function nf_warning(self, level) , all = "-Wall" , everything = "-Weverything -Wall -Wextra -Weffc++" , error = "-Werror" + , extra = "-Wextra" } -- get warning for nvcc diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index fe8a66871..cfdab0e01 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -279,6 +279,7 @@ function _add_target_warnings(cmakelists, target) , more = "-Wall" , all = "-Wall" , error = "-Werror" + , extra = "-Wextra" } local flags_msvc = { @@ -287,6 +288,7 @@ function _add_target_warnings(cmakelists, target) , more = "-W3" , all = "-W3" -- = "-Wall" will enable too more warnings , error = "-WX" + , extra = "-W4" } local warnings = target:get("warnings") if warnings then |
