summaryrefslogtreecommitdiffstats
path: root/win/rules.vc
diff options
context:
space:
mode:
Diffstat (limited to 'win/rules.vc')
-rw-r--r--win/rules.vc7
1 files changed, 7 insertions, 0 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 3f3d077..bca052b 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -68,11 +68,18 @@ VCVER=0
&& ![echo $(_HASH)endif >> vercl.x] \
&& ![cl -nologo -TC -P vercl.x $(ERRNULL)]
!include vercl.i
+!if $(VCVERSION) < 1900
!if ![echo VCVER= ^\> vercl.vc] \
&& ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
!include vercl.vc
!endif
+!else
+# The simple calculation above does not apply to new Visual Studio releases
+# Keep the compiler version in its native form.
+VCVER = $(VCVERSION)
+!endif
!endif
+
!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
!endif