Deleted Added
sdiff udiff text old ( 10878:0e466ba12a99 ) new ( 10881:133d8bb2024f )
full compact
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 805 unchanged lines hidden (view full) ---

814# add the new swig scanner that we like better
815from SCons.Scanner import ClassicCPP as CPPScanner
816swig_inc_re = '^[ \t]*[%,#][ \t]*(?:include|import)[ \t]*(<|")([^>"]+)(>|")'
817scanners.append(CPPScanner("SwigScan", [ ".i" ], "CPPPATH", swig_inc_re))
818
819# replace the scanners list that has what we want
820main['SCANNERS'] = scanners
821
822# Add a custom Check function to test for structure members.
823def CheckMember(context, include, decl, member, include_quotes="<>"):
824 context.Message("Checking for member %s in %s..." %
825 (member, decl))
826 text = """
827#include %(header)s
828int main(){
829 %(decl)s test;

--- 10 unchanged lines hidden (view full) ---

840 return ret
841
842# Platform-specific configuration. Note again that we assume that all
843# builds under a given build root run on the same host platform.
844conf = Configure(main,
845 conf_dir = joinpath(build_root, '.scons_config'),
846 log_file = joinpath(build_root, 'scons_config.log'),
847 custom_tests = {
848 'CheckMember' : CheckMember,
849 })
850
851# Check if we should compile a 64 bit binary on Mac OS X/Darwin
852try:
853 import platform
854 uname = platform.uname()
855 if uname[0] == 'Darwin' and compareVersions(uname[2], '9.0.0') >= 0:
856 if int(readCommand('sysctl -n hw.cpu64bit_capable')[0]):
857 main.Append(CCFLAGS=['-arch', 'x86_64'])
858 main.Append(CFLAGS=['-arch', 'x86_64'])

--- 545 unchanged lines hidden ---