From efd2217bfb87a84ed65728fbef977e83d7a3e80d Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Wed, 28 Apr 2010 16:10:16 +0000 Subject: add error message if source is compiled with unsupported compiler (delphi 2007 and newer) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2315 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/switches.inc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/switches.inc b/src/switches.inc index 55d8e619..64ebb5c2 100644 --- a/src/switches.inc +++ b/src/switches.inc @@ -17,23 +17,21 @@ // Delphi version numbers (ignore Delphi < 7 and Delphi 8 (VER160)) - {$IFDEF VER180} // Delphi 2006 (=10) + {$IF Defined(VER180)} // Delphi 2006 (=10) {$DEFINE DELPHI_10} {$DEFINE DELPHI_7_UP} {$DEFINE DELPHI_9_UP} {$DEFINE DELPHI_10_UP} - {$ENDIF} - - {$IFDEF VER170} // Delphi 2005 (=9) + {$ELSEIF Defined(VER170)} // Delphi 2005 (=9) {$DEFINE DELPHI_9} {$DEFINE DELPHI_7_UP} - {$DEFINE DELPHI_9_UP} - {$ENDIF} - - {$IFDEF VER150} // Delphi 7 + {$DEFINE DELPHI_9_UP} + {$ELSEIF Defined(VER150)} {$DEFINE DELPHI_7} {$DEFINE DELPHI_7_UP} - {$ENDIF} + {$ELSE} // unsupported + {$WARN ERROR 'Unsupported compiler version'} + {$IFEND} // inline directive introduced with Delphi 2005 {$IFDEF DELPHI_9_UP} @@ -128,4 +126,4 @@ {$DEFINE UsePortaudio} {$IFEND} -{$ENDIF PASDOC} +{$ENDIF PASDOC} \ No newline at end of file -- cgit v1.2.3