From 0ea626b89d66089705177f68b3f15d2750dbe0bc Mon Sep 17 00:00:00 2001 From: gsobala Date: Sat, 13 Oct 2018 15:00:06 +0100 Subject: Added .so to list possible darwin dynamic library suffixes (#4364) Occasionally Darwin libraries can be .so rather than .dylib e.g. tensorflow_cc.so tensorflow_cc is a c++ API for Tensorflow (https://github.com/FloopCZ/tensorflow_cc) which was primarily written for Linux but is also compilable on Darwin. Possibly through laziness, possibly just to have consistent filenames, the developers did not opt to change the suffix from the Linux default when this is compiled on Darwin. Also, the Darwin linker will find libraries with a .so suffix if they are in its path. find_library() needs to match the linker behaviour. --- run_unittests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index 9b7e45a..58b273d 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -584,7 +584,7 @@ class InternalTests(unittest.TestCase): 'static': unix_static}, 'linux': {'shared': ('lib{}.so', '{}.so'), 'static': unix_static}, - 'darwin': {'shared': ('lib{}.dylib', '{}.dylib'), + 'darwin': {'shared': ('lib{}.dylib', 'lib{}.so', '{}.dylib', '{}.so'), 'static': unix_static}, 'cygwin': {'shared': ('cyg{}.dll', 'cyg{}.dll.a', 'lib{}.dll', 'lib{}.dll.a', '{}.dll', '{}.dll.a'), -- cgit v1.1