SConscript (10686:1922f9d2ac01) SConscript (10878:0e466ba12a99)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

1010 swig_env = new_env.Clone()
1011
1012 # Both gcc and clang have issues with unused labels and values in
1013 # the SWIG generated code
1014 swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value'])
1015
1016 # Add additional warnings here that should not be applied to
1017 # the SWIG generated code
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

1010 swig_env = new_env.Clone()
1011
1012 # Both gcc and clang have issues with unused labels and values in
1013 # the SWIG generated code
1014 swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value'])
1015
1016 # Add additional warnings here that should not be applied to
1017 # the SWIG generated code
1018 new_env.Append(CXXFLAGS='-Wmissing-declarations')
1018 new_env.Append(CXXFLAGS=['-Wmissing-declarations',
1019 '-Wdelete-non-virtual-dtor'])
1019
1020 if env['GCC']:
1021 # Depending on the SWIG version, we also need to supress
1022 # warnings about uninitialized variables and missing field
1023 # initializers.
1024 swig_env.Append(CCFLAGS=['-Wno-uninitialized',
1025 '-Wno-missing-field-initializers',
1020
1021 if env['GCC']:
1022 # Depending on the SWIG version, we also need to supress
1023 # warnings about uninitialized variables and missing field
1024 # initializers.
1025 swig_env.Append(CCFLAGS=['-Wno-uninitialized',
1026 '-Wno-missing-field-initializers',
1026 '-Wno-unused-but-set-variable'])
1027 '-Wno-unused-but-set-variable',
1028 '-Wno-maybe-uninitialized'])
1027
1029
1028 # If gcc supports it, also warn for deletion of derived
1029 # classes with non-virtual desctructors. For gcc >= 4.7 we
1030 # also have to disable warnings about the SWIG code having
1031 # potentially uninitialized variables.
1032 if compareVersions(env['GCC_VERSION'], '4.7') >= 0:
1033 new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor')
1034 swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized')
1035
1036 # Only gcc >= 4.9 supports UBSan, so check both the version
1037 # and the command-line option before adding the compiler and
1038 # linker flags.
1039 if GetOption('with_ubsan') and \
1040 compareVersions(env['GCC_VERSION'], '4.9') >= 0:
1041 new_env.Append(CCFLAGS='-fsanitize=undefined')
1042 new_env.Append(LINKFLAGS='-fsanitize=undefined')
1043
1044 if env['CLANG']:
1030 # Only gcc >= 4.9 supports UBSan, so check both the version
1031 # and the command-line option before adding the compiler and
1032 # linker flags.
1033 if GetOption('with_ubsan') and \
1034 compareVersions(env['GCC_VERSION'], '4.9') >= 0:
1035 new_env.Append(CCFLAGS='-fsanitize=undefined')
1036 new_env.Append(LINKFLAGS='-fsanitize=undefined')
1037
1038 if env['CLANG']:
1045 # Always enable the warning for deletion of derived classes
1046 # with non-virtual destructors
1047 new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor'])
1048
1049 swig_env.Append(CCFLAGS=[
1050 # Some versions of SWIG can return uninitialized values
1051 '-Wno-sometimes-uninitialized',
1052 # Register storage is requested in a lot of places in
1053 # SWIG-generated code.
1054 '-Wno-deprecated-register',
1055 ])
1056

--- 227 unchanged lines hidden ---
1039 swig_env.Append(CCFLAGS=[
1040 # Some versions of SWIG can return uninitialized values
1041 '-Wno-sometimes-uninitialized',
1042 # Register storage is requested in a lot of places in
1043 # SWIG-generated code.
1044 '-Wno-deprecated-register',
1045 ])
1046

--- 227 unchanged lines hidden ---