handle correctly cases when compiler reject some option

This commit is contained in:
Radim Kolar 2014-09-08 17:03:36 +02:00
parent 6f8af27833
commit 0e03498d69

View File

@ -1,8 +1,8 @@
#
# Scons compiler tester
#
# Version 1.1
# 24-Aug-2009
# Version 1.2
# 08-Sep-2014
#
def checkForCCOption(conf,option):
@ -19,6 +19,10 @@ void dummy(void);
void dummy(void) {}
""",'.c')
if not rc:
try:
lastCFLAGS.remove(option)
except ValueError:
pass
conf.env.Replace(CCFLAGS = lastCFLAGS)
conf.Result(rc)
return rc