aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-17 13:27:11 +0100
committerMartin Ridgers <[email protected]>2021-11-17 13:49:28 +0100
commit281ab5d9034c10b1a457eeb0db8cb180384cf7ca (patch)
treeeba28718a8614713d7884f366197405202bb26a7 /xmake.lua
parentAdded a "zenmesh" config option (diff)
downloadzen-281ab5d9034c10b1a457eeb0db8cb180384cf7ca.tar.xz
zen-281ab5d9034c10b1a457eeb0db8cb180384cf7ca.zip
Enabled the use-of-undefined-preprocessor macro warning
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)