cmake: Fix tests on Solaris.
authorAndreas Schneider <asn@samba.org>
Thu, 23 Oct 2014 10:41:52 +0000 (12:41 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 23 Oct 2014 12:21:55 +0000 (14:21 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
tests/CMakeLists.txt

index acd675f214518337075f65438963b8597533993a..fb8876ca8ae4f6f7a4ca0e53b05bfaa025c7e2cb 100644 (file)
@@ -33,7 +33,10 @@ set(PRELOAD_LIBS ${RESOLV_WRAPPER_LOCATION})
 
 # Some tests require socket_wrapper as well.
 find_package(socket_wrapper)
-if (HAVE_LIBRESOLV AND SOCKET_WRAPPER_LIBRARY)
+
+# On Solaris the socket functions are compiled into libresolv.so so we can't preload
+# socket_wrapper. Only faking will work!
+if (HAVE_LIBRESOLV AND SOCKET_WRAPPER_LIBRARY AND NOT SOLARIS)
     set(RWRAP_TESTS ${RWRAP_TESTS} test_res_query_search)
     set(PRELOAD_LIBS ${RESOLV_WRAPPER_LOCATION}:${SOCKET_WRAPPER_LIBRARY})
 endif()