summaryrefslogtreecommitdiff
path: root/src/systemc/SConscript
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-02-27 16:26:39 -0800
committerGabe Black <gabeblack@google.com>2019-02-28 22:29:36 +0000
commitb48e4a90bfb06612b1402088243e49ef2a1b846f (patch)
treec2bcc2a0edd4c1d4cd172e73756d527cec933d3b /src/systemc/SConscript
parent21a4cc9692e30390547bf99887840ee32a75233b (diff)
downloadgem5-b48e4a90bfb06612b1402088243e49ef2a1b846f.tar.xz
systemc: Move systemc disabling checks to SConsopts.
This will ensure that the value of USE_SYSTEMC is consistent throughout the build. It also has the side effect that USE_SYSTEMC can be forced to a particular value if you're confident you know what you're doing and want to override these checks. Change-Id: I0f2d1153245ff17ce4a828c6b7496cb9ded6bd5b Reviewed-on: https://gem5-review.googlesource.com/c/16810 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/SConscript')
-rw-r--r--src/systemc/SConscript21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/systemc/SConscript b/src/systemc/SConscript
index c820b457e..b2673947f 100644
--- a/src/systemc/SConscript
+++ b/src/systemc/SConscript
@@ -27,22 +27,9 @@
Import('*')
-from m5.util import compareVersions
-from m5.util.terminal import termcap
+if not env['USE_SYSTEMC']:
+ Return()
-if env['USE_SYSTEMC']:
- if ('GCC_VERSION' in env and \
- compareVersions(env['GCC_VERSION'], '5.0') < 0) or \
- env['PLATFORM'] == 'darwin':
+env.UseSystemcCheck(warn=True)
- if env['PLATFORM'] == 'darwin':
- print(termcap.Yellow + termcap.Bold +
- 'Warning: Disabling systemc on Mac OS.' + termcap.Normal)
- else:
- print(termcap.Yellow + termcap.Bold +
- 'Warning: Disabling systemc on gcc versions less than 5.0.' +
- termcap.Normal)
- env['USE_SYSTEMC'] = False
- Return()
-
- env.Append(CPPPATH=Dir('ext'))
+env.Append(CPPPATH=Dir('ext'))