From 853fea4541dbb4c0754b8904ae29fd062fe1b5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 30 Oct 2008 04:45:59 +0000 Subject: [PATCH] Check that a supported compiler is used to when compiling c++check --- main.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 8dd60630b..a5da374ce 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,4 @@ -/* +/* * c++check - c/c++ syntax checking * Copyright (C) 2007 Daniel Marjamäki * @@ -32,6 +32,19 @@ #include +// Check that the compiler are supported +// This program should be compiled with either GCC/BORLAND/MSC to work.. +#ifndef __GNUC__ +#ifndef __BORLANDC__ +#ifndef _MSC_VER +#error "C++Check must be compiled by either GCC/BORLAND/MSC to work fully.\n" +#error "Please report that you couldn't compile c++check through the web page:\n" +#error " https://sourceforge.net/projects/cppcheck/" +#endif +#endif +#endif + + #ifdef __GNUC__ #include #include