From 281ab5d9034c10b1a457eeb0db8cb180384cf7ca Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Wed, 17 Nov 2021 13:27:11 +0100 Subject: Enabled the use-of-undefined-preprocessor macro warning --- xmake.lua | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- cgit v1.2.3