summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/cl.lua1
-rw-r--r--xmake/modules/core/tools/gcc.lua1
-rw-r--r--xmake/modules/core/tools/nvcc.lua2
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua2
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