]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a really stupid problem with icc7.
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Nov 2004 20:11:49 +0000 (20:11 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Nov 2004 20:11:49 +0000 (20:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@9745 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparse_direct.cc

index 46b0d5f4ccc40c2eb85b416a99de6128421232e9..1611aa0bccdbc9cbd3e4e3516939701fc9753299 100644 (file)
 #include <list>
 #include <typeinfo>
 
+
+// this is a weird hack: on newer linux systems, some system headers
+// include /usr/include/linux/compiler.h which explicitly checks which
+// gcc is in use. in that file is also a comment that explains that
+// the check for gcc version also applies to icc since icc identifies
+// itself as gcc via __GNUC__; if the gcc major version is not >=2, it
+// aborts.
+//
+// now, only icc8 and later identify themselves as gcc, so older icc
+// versions fail to compile this file on such systems. to avoid this
+// failure, we allow icc to identify itself as gcc if it doesn't
+// already do so by itself:
+#if defined(__INTEL_COMPILER) && !defined(__GNUC__)
+#  define __GNUC__ 3
+#endif
+
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <signal.h>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.