From 7cb1415530a6e9d531a3f11d3cefb7a9f3f1195d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 8 Aug 2013 01:53:02 +0000 Subject: pass compiler defines such as __FLT_MIN__ to smatch and sparse (they fail without them). --- build_files/cmake/cmake_static_check_smatch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build_files/cmake/cmake_static_check_smatch.py') diff --git a/build_files/cmake/cmake_static_check_smatch.py b/build_files/cmake/cmake_static_check_smatch.py index 2cf07b093fb..ad8b872b22c 100644 --- a/build_files/cmake/cmake_static_check_smatch.py +++ b/build_files/cmake/cmake_static_check_smatch.py @@ -44,6 +44,7 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None) def main(): source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX) + source_defines = project_source_info.build_defines_as_args() check_commands = [] for c, inc_dirs, defs in source_info: @@ -52,7 +53,8 @@ def main(): CHECKER_ARGS + [c] + [("-I%s" % i) for i in inc_dirs] + - [("-D%s" % d) for d in defs] + [("-D%s" % d) for d in defs] + + source_defines ) check_commands.append((c, cmd)) -- cgit v1.2.3