aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJacob Bramley <jacob.bramley@arm.com>2020-01-31 14:19:57 +0000
committerJacob Bramley <jacob.bramley@arm.com>2020-02-03 09:45:18 +0000
commit191e757e9d886debde6e3f493f066485a872367c (patch)
tree18979e7e53917686ed83493ae33f26c920a1189f /SConstruct
parent5fb2ad66ad153940d4117a880157daf8390695e6 (diff)
downloadvixl-191e757e9d886debde6e3f493f066485a872367c.tar.gz
Move to a C++14 baseline.
All of our known users already use C++14 or later, and C++14 offers some features that have potential to be very useful to VIXL. This change updates the build scripts, and adds a #error guard to catch unsupported '-std' overrides. It does not introduce any C++14 code. Change-Id: If72806ff9d9e9695cce8d677d301318f09312de3
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct27
1 files changed, 10 insertions, 17 deletions
diff --git a/SConstruct b/SConstruct
index 8e1b1a73..eb80741b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -251,8 +251,10 @@ vars.AddVariables(
DefaultVariable('code_buffer_allocator',
'Configure the allocation mechanism in the CodeBuffer',
['malloc', 'mmap']),
- ('std', 'C++ standard. The standards tested are: %s.' % \
- ', '.join(config.tested_cpp_standards)),
+ ('std',
+ 'C++ standard. The standards tested are: %s.' % \
+ ', '.join(config.tested_cpp_standards),
+ config.tested_cpp_standards[0]),
('compiler_wrapper', 'Command to prefix to the C and C++ compiler (e.g ccache)', '')
)
@@ -381,21 +383,12 @@ def ConfigureEnvironmentForCompiler(env):
if env['negative_testing'] == 'on' and env['mode'] == 'debug' \
and compiler >= 'gcc-6':
env.Append(CPPFLAGS = ['-Wno-terminate'])
- # The C++11 compatibility warning will also be triggered for this case, as
- # the behavior of throwing from desctructors has changed.
- if 'std' in env and env['std'] == 'c++98':
- env.Append(CPPFLAGS = ['-Wno-c++11-compat'])
-
- # When compiling with c++98 (the default), allow long long constants.
- if 'std' not in env or env['std'] == 'c++98':
- env.Append(CPPFLAGS = ['-Wno-long-long'])
- env.Append(CPPFLAGS = ['-Wno-variadic-macros'])
- # When compiling with c++11, suggest missing override keywords on methods.
- if 'std' in env and env['std'] in ['c++11', 'c++14']:
- if compiler >= 'gcc-5':
- env.Append(CPPFLAGS = ['-Wsuggest-override'])
- elif compiler >= 'clang-3.6':
- env.Append(CPPFLAGS = ['-Winconsistent-missing-override'])
+
+ # Suggest missing override keywords on methods.
+ if compiler >= 'gcc-5':
+ env.Append(CPPFLAGS = ['-Wsuggest-override'])
+ elif compiler >= 'clang-3.6':
+ env.Append(CPPFLAGS = ['-Winconsistent-missing-override'])
def ConfigureEnvironment(env):