SConstruct (10160:3f4372fa8e6c) | SConstruct (10181:6270235e0585) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2013 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 --- 712 unchanged lines hidden (view full) --- 721# Check for appropriate SWIG version 722swig_version = readCommand([main['SWIG'], '-version'], exception='').split() 723# First 3 words should be "SWIG Version x.y.z" 724if len(swig_version) < 3 or \ 725 swig_version[0] != 'SWIG' or swig_version[1] != 'Version': 726 print 'Error determining SWIG version.' 727 Exit(1) 728 | 1# -*- mode:python -*- 2 3# Copyright (c) 2013 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 --- 712 unchanged lines hidden (view full) --- 721# Check for appropriate SWIG version 722swig_version = readCommand([main['SWIG'], '-version'], exception='').split() 723# First 3 words should be "SWIG Version x.y.z" 724if len(swig_version) < 3 or \ 725 swig_version[0] != 'SWIG' or swig_version[1] != 'Version': 726 print 'Error determining SWIG version.' 727 Exit(1) 728 |
729min_swig_version = '1.3.34' | 729min_swig_version = '2.0.4' |
730if compareVersions(swig_version[2], min_swig_version) < 0: 731 print 'Error: SWIG version', min_swig_version, 'or newer required.' 732 print ' Installed version:', swig_version[2] 733 Exit(1) 734 | 730if compareVersions(swig_version[2], min_swig_version) < 0: 731 print 'Error: SWIG version', min_swig_version, 'or newer required.' 732 print ' Installed version:', swig_version[2] 733 Exit(1) 734 |
735# Older versions of swig do not play well with more recent versions of 736# gcc due to assumptions on implicit includes (cstddef) and use of 737# namespaces 738if main['GCC'] and compareVersions(gcc_version, '4.6') > 0 and \ 739 compareVersions(swig_version[2], '2') < 0: 740 print '\n' + termcap.Yellow + termcap.Bold + \ 741 'Warning: SWIG 1.x cause issues with gcc 4.6 and later.\n' + \ 742 termcap.Normal + \ 743 'Use SWIG 2.x to avoid assumptions on implicit includes\n' + \ 744 'and use of namespaces\n' 745 | |
746# Set up SWIG flags & scanner 747swig_flags=Split('-c++ -python -modern -templatereduce $_CPPINCFLAGS') 748main.Append(SWIGFLAGS=swig_flags) 749 750# filter out all existing swig scanners, they mess up the dependency 751# stuff for some reason 752scanners = [] 753for scanner in main['SCANNERS']: --- 571 unchanged lines hidden --- | 735# Set up SWIG flags & scanner 736swig_flags=Split('-c++ -python -modern -templatereduce $_CPPINCFLAGS') 737main.Append(SWIGFLAGS=swig_flags) 738 739# filter out all existing swig scanners, they mess up the dependency 740# stuff for some reason 741scanners = [] 742for scanner in main['SCANNERS']: --- 571 unchanged lines hidden --- |