From 9528c86790fcab6ce42cd568d5b881667a0fd05f Mon Sep 17 00:00:00 2001
From: Innocent Niyonzima <in2199@columbia.edu>
Date: Sun, 17 Apr 2016 14:06:16 +0000
Subject: [PATCH] fix compile w/o mesh

---
 CMakeLists.txt          | 3 +++
 Geo/MElement.cpp        | 4 ++++
 Numeric/MetricBasis.cpp | 2 ++
 3 files changed, 9 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f65eae2487..10995874ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1421,6 +1421,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
       list(APPEND LINK_LIBRARIES ${RT_LIB})
     endif(RT_LIB)
   endif(HAVE_OCC)
+  if(CMAKE_C_COMPILER_ID MATCHES "GNU")
+    add_definitions(-fPIC)
+  endif(CMAKE_C_COMPILER_ID MATCHES "GNU")
 endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 
 # we could specify include dirs more selectively, but this is simpler
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 52e8153362..bb9ecbe93a 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -236,7 +236,11 @@ double MElement::maxDistToStraight() const
 
 double MElement::minAnisotropyMeasure()
 {
+#if defined(HAVE_MESH)
   return jacobianBasedQuality::minAnisotropyMeasure(this);
+#else
+  return 0.;
+#endif
 }
 
 void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge) const
diff --git a/Numeric/MetricBasis.cpp b/Numeric/MetricBasis.cpp
index 7294c03275..decce19cb3 100644
--- a/Numeric/MetricBasis.cpp
+++ b/Numeric/MetricBasis.cpp
@@ -716,8 +716,10 @@ bool MetricBasis::validateBezierForMetricAndJacobian()
 
       elements[iel] = el;
     }
+#if defined(HAVE_PLUGINS)
     GMSH_AnalyseCurvedMeshPlugin plugin = GMSH_AnalyseCurvedMeshPlugin();
     plugin.test(elements, numElem, dim);
+#endif
   }
 
 
-- 
GitLab