From 423fe1048beea1bf41cd94bdc99f1356a92c913a Mon Sep 17 00:00:00 2001
From: graham <g.macpherson@opencfd.co.uk>
Date: Fri, 18 Feb 2011 16:18:46 +0000
Subject: [PATCH] COMP: Correcting CGAL/boost/GMP build setup.

---
 etc/settings.csh         | 5 +++--
 etc/settings.sh          | 5 +++--
 wmake/rules/General/CGAL | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/etc/settings.csh b/etc/settings.csh
index 607d00d3a37..0113cc99a55 100644
--- a/etc/settings.csh
+++ b/etc/settings.csh
@@ -84,7 +84,7 @@ _foamAddLib  ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_EXT_L
 # Compiler settings
 # ~~~~~~~~~~~~~~~~~
 unset gcc_version gmp_version mpfr_version mpc_version
-unsetenv MPFR_ARCH_PATH
+unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH
 
 
 # Location of compiler installation
@@ -178,6 +178,7 @@ case ThirdParty:
 
         # used by boost/CGAL:
         setenv MPFR_ARCH_PATH $mpfrDir
+        setenv GMP_ARCH_PATH $gmpDir
     endif
     unset gcc_version gccDir
     unset gmp_version gmpDir  mpfr_version mpfrDir  mpc_version mpcDir
@@ -243,7 +244,7 @@ if ( -d "$CGAL_ARCH_PATH" ) then
     endif
     _foamAddLib $CGAL_ARCH_PATH/lib
 else
-    unsetenv BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH
+    unsetenv BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH
 endif
 
 unset boost_version cgal_version
diff --git a/etc/settings.sh b/etc/settings.sh
index a20742b5fa3..aca41877288 100644
--- a/etc/settings.sh
+++ b/etc/settings.sh
@@ -107,7 +107,7 @@ _foamAddLib  $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$
 # Compiler settings
 # ~~~~~~~~~~~~~~~~~
 unset gcc_version gmp_version mpfr_version mpc_version
-unset MPFR_ARCH_PATH
+unset MPFR_ARCH_PATH GMP_ARCH_PATH
 
 # Location of compiler installation
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -198,6 +198,7 @@ OpenFOAM | ThirdParty)
 
         # used by boost/CGAL:
         export MPFR_ARCH_PATH=$mpfrDir
+        export GMP_ARCH_PATH=$gmpDir
     fi
     unset gcc_version gccDir
     unset gmp_version gmpDir  mpfr_version mpfrDir  mpc_version mpcDir
@@ -264,7 +265,7 @@ then
     fi
     _foamAddLib $CGAL_ARCH_PATH/lib
 else
-    unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH
+    unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH
 fi
 
 unset boost_version cgal_version
diff --git a/wmake/rules/General/CGAL b/wmake/rules/General/CGAL
index e0a71bd968c..126640dc0cf 100644
--- a/wmake/rules/General/CGAL
+++ b/wmake/rules/General/CGAL
@@ -2,7 +2,8 @@ CGAL_INC = \
     -Wno-old-style-cast \
     -I$(CGAL_ARCH_PATH)/include \
     -I$(MPFR_ARCH_PATH)/include \
-    -I$(BOOST_ARCH_PATH)/include/boost
+    -I$(GMP_ARCH_PATH)/include \
+    -I$(BOOST_ARCH_PATH)/include
 
 CGAL_LIBS = \
     -L$(MPFR_ARCH_PATH)/lib \
-- 
GitLab