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