mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Modified some compiler warning settings
This commit is contained in:
@@ -161,7 +161,7 @@ defaults.noDebugLinkFlags = ''
|
||||
|
||||
if env['CC'] == 'gcc':
|
||||
defaults.cxxFlags = '-ftemplate-depth-128'
|
||||
defaults.ccFlags = '-Wall'
|
||||
defaults.ccFlags = '-Wall -Wno-deprecated-declarations'
|
||||
defaults.debugCcFlags = '-g'
|
||||
defaults.noOptimizeCcFlags = '-O0 -fno-inline'
|
||||
defaults.optimizeCcFlags = '-O3 -DNDEBUG -finline-functions -Wno-inline'
|
||||
@@ -169,7 +169,7 @@ if env['CC'] == 'gcc':
|
||||
elif env['CC'] == 'cl': # Visual Studio
|
||||
defaults.cxxFlags = '/EHsc'
|
||||
defaults.ccFlags = ' '.join(['/nologo', '/Zi', '/W3', '/Zc:wchar_t', '/Zc:forScope',
|
||||
'/D_SCL_SECURE_NO_WARNINGS', '/D_CRT_SECURE_NO_WARNINGS'])
|
||||
'/D_SCL_SECURE_NO_WARNINGS', '/D_CRT_SECURE_NO_WARNINGS', '/wd4996'])
|
||||
defaults.debugCcFlags = '/MD' # note: MDd breaks the Python module
|
||||
defaults.noOptimizeCcFlags = '/Od /Ob0'
|
||||
defaults.optimizeCcFlags = '/O2 /DNDEBUG'
|
||||
@@ -184,6 +184,9 @@ elif env['CC'] == 'icc':
|
||||
else:
|
||||
print "WARNING: Unrecognized C compiler '%s'" % env['CC']
|
||||
|
||||
# TODO: Once deprecated functions have been removed, remove the
|
||||
# compiler options: -Wno-deprecated-declarations and /wd4996
|
||||
|
||||
# **************************************
|
||||
# *** Read user-configurable options ***
|
||||
# **************************************
|
||||
|
||||
@@ -26,6 +26,10 @@ def prep_f2c(env):
|
||||
if '-Wall' in localenv['CCFLAGS']:
|
||||
localenv['CCFLAGS'].remove('-Wall')
|
||||
localenv['CCFLAGS'].append('-Wno-format-security')
|
||||
elif '/W3' in localenv['CCFLAGS']:
|
||||
localenv['CCFLAGS'].remove('/W3')
|
||||
elif '-Wcheck' in localenv['CCFLAGS']:
|
||||
localenv['CCFLAGS'].remove('-Wcheck')
|
||||
|
||||
return localenv
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ localenv.Append(CPPPATH=[gcv('INCLUDEPY'), env['python_array_include']],
|
||||
CPPFLAGS=((gcv('BASECFLAGS') or '').split() +
|
||||
(gcv('OPT') or '').split()))
|
||||
|
||||
if '-Wstrict-prototypes' in localenv['CPPFLAGS']:
|
||||
localenv['CPPFLAGS'].remove('-Wstrict-prototypes')
|
||||
|
||||
if localenv['OS'] == 'Windows':
|
||||
localenv.Append(LIBPATH=pjoin(gcv('prefix'), 'libs'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user