From b9df0155eaadae80994dfad279e85f75d582bc42 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 12 Sep 2006 09:28:11 +0000 Subject: [PATCH] Properly generated flag for intel/vc. * intel-win.jam (init): Strip 'vc' from the version passed to msvc.configure-verion-specific. * msvc.jam (configure-version-specific): Accept '6' and '7', not just 6.N and 7.N. [SVN r35071] --- src/tools/intel-win.jam | 12 ++++++++++-- src/tools/msvc.jam | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/tools/intel-win.jam b/src/tools/intel-win.jam index f138607a0..68d707298 100644 --- a/src/tools/intel-win.jam +++ b/src/tools/intel-win.jam @@ -7,6 +7,7 @@ import toolset ; import feature ; import toolset : flags ; import os ; +import errors ; # This is needed because the rule we import here depend on 'common' # That's nasty. @@ -137,10 +138,17 @@ rule init ( version ? : # the compiler version if ! $(compatibility) { # If there's no backend version, assume 7.1. - compatibility = 7.1 ; + compatibility = vc7.1 ; } - msvc.configure-version-specific intel-win : $(compatibility) : $(condition) ; + local extract-version = [ MATCH ^vc(.*) : $(compatibility) ] ; + if ! $(extract-version) + { + errors.user-error "Invalid value for compatibility option:" + $(compatibility) ; + } + + msvc.configure-version-specific intel-win : $(extract-version[1]) : $(condition) ; } flags intel-win.link LIBRARY_OPTION intel : "" ; diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 119e8e23f..98fbac877 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -415,7 +415,7 @@ rule configure-version-specific ( toolset : version : condition ) # Processor-specific optimization # - if [ MATCH ^([67]\\.) : $(version) ] + if [ MATCH ^([67]) : $(version) ] { # 8.0 deprecates some of the options flags $(toolset).compile CFLAGS $(condition)/speed $(condition)/space : /Ogiy /Gs ;