From f9b6d5f93546ad5567e6caee7818141108002b7c Mon Sep 17 00:00:00 2001
From: Eleni Mathioulaki <emathioulaki@athenarc.gr>
Date: Sun, 17 Jul 2022 04:15:41 +0200
Subject: [PATCH] Update packages/hxtorch/package.py

---
 packages/hxtorch/package.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/packages/hxtorch/package.py b/packages/hxtorch/package.py
index bb0c55fe..43d44ba7 100644
--- a/packages/hxtorch/package.py
+++ b/packages/hxtorch/package.py
@@ -83,6 +83,15 @@ class Hxtorch(WafPackage):
                             env.remove_path('SPACK_LINK_DIRS', d)
                             env.remove_path('SPACK_RPATH_DIRS', d)
                     continue
+                if dep.name == 'googletest':
+                    for d in [self.spec['googletest'].prefix.lib64, self.spec['googletest'].prefix.lib]:
+                        if os.path.exists(d):
+                            print('manually inserting at front ', d)
+                            env.remove_path('SPACK_LINK_DIRS', d)
+                            env.prepend_path('SPACK_LINK_DIRS', d)
+                            env.remove_path('SPACK_RPATH_DIRS', d)
+                            env.prepend_path('SPACK_RPATH_DIRS', d)
+                    continue
                 library.extend(query.libs.directories)
                 print('libs (', dep.name, '):', query.libs.directories, "\n")
             except:
-- 
GitLab