aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake.lua b/xmake.lua
index 0e9468cc0..d93f73c4f 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -61,6 +61,13 @@ if is_os("linux") then
add_cxxflags("-Wno-missing-field-initializers")
end
+-- Turn use of undefined cpp macros into errors
+if is_os("windows") then
+ add_cxxflags("/we4668")
+else
+ add_cxxflags("-Wundef")
+end
+
function add_define_by_config(define, config_name)
local value = has_config(config_name) and 1 or 0
add_defines(define.."="..value)