From a29f40cabb7ed4083079f55e3193e14e89dddcf0 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Tue, 5 Mar 2019 14:18:22 +0100
Subject: [PATCH] [A/FileIO/Legacy] Add path to gmsh needed for MS Windows.

---
 Applications/FileIO/Legacy/createSurface.cpp | 5 +++--
 Applications/FileIO/Legacy/createSurface.h   | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Applications/FileIO/Legacy/createSurface.cpp b/Applications/FileIO/Legacy/createSurface.cpp
index 0a6a3a2d3c1..79ffd930734 100644
--- a/Applications/FileIO/Legacy/createSurface.cpp
+++ b/Applications/FileIO/Legacy/createSurface.cpp
@@ -32,7 +32,8 @@ namespace FileIO
 {
 bool createSurface(GeoLib::Polyline const& ply,
                    GeoLib::GEOObjects& geometries,
-                   std::string const& geometry_name)
+                   std::string const& geometry_name,
+                   std::string const& gmsh_binary)
 {
     if (!ply.isClosed())
     {
@@ -84,7 +85,7 @@ bool createSurface(GeoLib::Polyline const& ply,
     std::string const file_base_name(file_base_name_c);
     gmsh_io.writeToFile(file_base_name + ".geo");
     std::string gmsh_command =
-        "gmsh -2 -algo meshadapt \"" + file_base_name + ".geo\"";
+        gmsh_binary + " -2 -algo meshadapt \"" + file_base_name + ".geo\"";
     gmsh_command += " -o \"" + file_base_name + ".msh\"";
     int const gmsh_return_value = std::system(gmsh_command.c_str());
     if (gmsh_return_value != 0)
diff --git a/Applications/FileIO/Legacy/createSurface.h b/Applications/FileIO/Legacy/createSurface.h
index 36162aa13a4..7acc0cb813d 100644
--- a/Applications/FileIO/Legacy/createSurface.h
+++ b/Applications/FileIO/Legacy/createSurface.h
@@ -26,5 +26,6 @@ namespace FileIO
 /// name \c geometry_name.
 bool createSurface(GeoLib::Polyline const& polyline,
                    GeoLib::GEOObjects& geometries,
-                   std::string const& geometry_name);
+                   std::string const& geometry_name,
+                   std::string const& gmsh_binary);
 }  // namespace FileIO
-- 
GitLab